lkml.org 
[lkml]   [2020]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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

\
 
 \ /
  Last update: 2020-03-06 02:43    [W:0.203 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site