linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Rosenberg <drosen@google.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH] f2fs: fix wrong check on F2FS_IOC_FSSETXATTR
Date: Thu, 5 Mar 2020 17:42:09 -0800	[thread overview]
Message-ID: <CA+PiJmQzj0Lj2FKi3A4Z=LC_tcQ9i9xtb3dmXwa9fSsQ+YN_LA@mail.gmail.com> (raw)
In-Reply-To: <20200305234822.178708-1-jaegeuk@kernel.org>

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

  parent reply	other threads:[~2020-03-06  1:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05 23:48 [PATCH] f2fs: fix wrong check on F2FS_IOC_FSSETXATTR Jaegeuk Kim
2020-03-06  1:39 ` [f2fs-dev] " Chao Yu
2020-03-06  1:42 ` Daniel Rosenberg [this message]
2020-03-07  0:24 ` [PATCH v2] " Jaegeuk Kim
2020-03-09  8:24   ` [f2fs-dev] " Chao Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+PiJmQzj0Lj2FKi3A4Z=LC_tcQ9i9xtb3dmXwa9fSsQ+YN_LA@mail.gmail.com' \
    --to=drosen@google.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).