public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <esandeen@redhat.com>
To: xfs <linux-xfs@vger.kernel.org>, "Darrick J. Wong" <djwong@kernel.org>
Subject: Re: [PATCH] xfs: remove incorrect ASSERT in xfs_rename
Date: Wed, 1 Dec 2021 10:42:50 -0600	[thread overview]
Message-ID: <2106770b-5977-47b6-8b91-22b829cc5bf7@redhat.com> (raw)
In-Reply-To: <bbb4b6d5-744c-11c8-fcda-62777e8d7b19@redhat.com>

On 11/30/21 11:17 PM, Eric Sandeen wrote:
> This ASSERT in xfs_rename is a) incorrect, because
> (RENAME_WHITEOUT|RENAME_NOREPLACE) is a valid combination, and
> b) unnecessary, because actual invalid flag combinations are already
> handled at the vfs level in do_renameat2() before we get called.
> So, remove it.
> 
> Reported-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
> 
> diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
> index 64b9bf3..6771f35 100644
> --- a/fs/xfs/xfs_inode.c
> +++ b/fs/xfs/xfs_inode.c
> @@ -3122,7 +3122,6 @@ struct xfs_iunlink {
>        * appropriately.
>        */
>       if (flags & RENAME_WHITEOUT) {
> -        ASSERT(!(flags & (RENAME_NOREPLACE | RENAME_EXCHANGE)));
>           error = xfs_rename_alloc_whiteout(mnt_userns, target_dp, &wip);
>           if (error)
>               return error;
> 

Ugh, I don't understand this flavor of whitespace mangling I'm getting now,
I'm sorry :(


  reply	other threads:[~2021-12-01 16:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-01  5:17 [PATCH] xfs: remove incorrect ASSERT in xfs_rename Eric Sandeen
2021-12-01 16:42 ` Eric Sandeen [this message]
2021-12-01 17:57 ` Darrick J. Wong

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=2106770b-5977-47b6-8b91-22b829cc5bf7@redhat.com \
    --to=esandeen@redhat.com \
    --cc=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /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