Messages in this thread | | | From | Daniel Rosenberg <> | Date | Thu, 5 Mar 2020 17:42:09 -0800 | Subject | Re: [PATCH] f2fs: fix wrong check on F2FS_IOC_FSSETXATTR |
| |
On Thu, Mar 5, 2020 at 3:48 PM Jaegeuk Kim <jaegeuk@kernel.org> wrote: > > This fixes the incorrect failure when enabling project quota on casefold-enabled > file. > > Cc: Daniel Rosenberg <drosen@google.com> > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> > ---
This fixes the issue I was seeing, I'm just a bit concerned with the last two.
> > fi->i_flags = iflags | (fi->i_flags & ~mask); > - f2fs_bug_on(F2FS_I_SB(inode), (fi->i_flags & F2FS_COMPR_FL) && > - (fi->i_flags & F2FS_NOCOMP_FL)); > + f2fs_bug_on(F2FS_I_SB(inode), (masked_flags & F2FS_COMPR_FL) && > + (masked_flags & F2FS_NOCOMP_FL)); > > - if (fi->i_flags & F2FS_PROJINHERIT_FL) > + if (masked_flags & F2FS_PROJINHERIT_FL) > set_inode_flag(inode, FI_PROJ_INHERIT); > else > clear_inode_flag(inode, FI_PROJ_INHERIT); > -- > 2.25.1.481.gfbce0eb801-goog >
Shouldn't these still be fi->i_flags? masked_flags comes from the previously set i_flags, so this would change from testing the new combination that was just set for fi->i_flags to checking only the masked version of the old flags. It might make it clearer to rename masked_flags to masked_old_flags, or something like that. -Daniel
| |