Re: [PATCH] ocfs2: validate group add input before caching

ZhengYuan Huang <[email protected]>
Newsgroups dev.linux.lists.ocfs2-devel,org.kernel.vger.linux-kernel
Message-ID <CAOmEq9VVDmZZE11zEZWpciPdk_m00abvQb_3n44P_HL6asA4Ow@mail.gmail.com>
On Thu, Apr 9, 2026 at 9:05 PM Joseph Qi <[email protected]> wrote:
> Missing Fixes tag:
> Fixes: 7909f2bf8353 ("[PATCH 2/2] ocfs2: Implement group add for online resize")
>
> > ---
> >  fs/ocfs2/resize.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/fs/ocfs2/resize.c b/fs/ocfs2/resize.c
> > index b0733c08ed13..e45ab5592ee0 100644
> > --- a/fs/ocfs2/resize.c
> > +++ b/fs/ocfs2/resize.c
> > @@ -504,14 +504,14 @@ int ocfs2_group_add(struct inode *inode, struct ocfs2_new_group_input *input)
> >               goto out_unlock;
> >       }
> >
> > -     ocfs2_set_new_buffer_uptodate(INODE_CACHE(inode), group_bh);
> > -
> >       ret = ocfs2_verify_group_and_input(main_bm_inode, fe, input, group_bh);
> >       if (ret) {
> >               mlog_errno(ret);
> >               goto out_free_group_bh;
> >       }
>
> Since ocfs2_set_new_buffer_uptodate is now moved down, the error goto
> above should also be changed.
>
> e.g. do the same ioctl twice, the second will remove the cache which
> should be valid. This is not the expected behavior.
>
> Thanks,
> Joseph

Thanks for pointing this out.

The issue is valid, and I’ve addressed it in v2 by fixing the error
path accordingly.
v2 patch has been sent.

Thanks,
ZhengYuan Huang
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.