public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Eric Sandeen <esandeen@redhat.com>
Cc: xfs <linux-xfs@vger.kernel.org>, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] xfs: remove incorrect ASSERT in xfs_rename
Date: Wed, 1 Dec 2021 09:57:48 -0800	[thread overview]
Message-ID: <20211201175748.GL8467@magnolia> (raw)
In-Reply-To: <bbb4b6d5-744c-11c8-fcda-62777e8d7b19@redhat.com>

On Tue, Nov 30, 2021 at 11:17:56PM -0600, 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>

LGTM,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
> 
> 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;
> 

      parent reply	other threads:[~2021-12-01 17:58 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
2021-12-01 17:57 ` Darrick J. Wong [this message]

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=20211201175748.GL8467@magnolia \
    --to=djwong@kernel.org \
    --cc=esandeen@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=pbonzini@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