Archive-only list for patches
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Askar Safin <safinaskar@zohomail.com>
Cc: Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
	cyphar@cyphar.com, Ian Kent <raven@themaw.net>,
	linux-fsdevel@vger.kernel.org,
	David Howells <dhowells@redhat.com>,
	autofs mailing list <autofs@vger.kernel.org>,
	patches@lists.linux.dev
Subject: Re: [PATCH 2/4] vfs: fs/namei.c: remove LOOKUP_NO_XDEV check from handle_mounts
Date: Sun, 17 Aug 2025 19:00:57 +0100	[thread overview]
Message-ID: <20250817180057.GA222315@ZenIV> (raw)
In-Reply-To: <20250817171513.259291-3-safinaskar@zohomail.com>

On Sun, Aug 17, 2025 at 05:15:11PM +0000, Askar Safin wrote:
> This is preparation to RESOLVE_NO_XDEV fix in following commits.
> No functional change intended
> 
> Signed-off-by: Askar Safin <safinaskar@zohomail.com>
> ---
>  fs/namei.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/namei.c b/fs/namei.c
> index 1e13d8e119a4..00f79559e135 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -1635,10 +1635,8 @@ static inline int handle_mounts(struct nameidata *nd, struct dentry *dentry,
>  			return -ECHILD;
>  	}
>  	ret = traverse_mounts(path, &jumped, &nd->total_link_count, nd->flags);
> -	if (jumped) {
> -		if (!unlikely(nd->flags & LOOKUP_NO_XDEV))
> -			nd->state |= ND_JUMPED;
> -	}
> +	if (jumped)
> +		nd->state |= ND_JUMPED;

I'd add something along the lines of "the only place that ever looks at
ND_JUMPED in nd->state is complete_walk() and we are not going to reach
it if handle_mounts() returns an error" to commit message.

  reply	other threads:[~2025-08-17 18:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-17 17:15 [PATCH 0/4] vfs: if RESOLVE_NO_XDEV passed to openat2, don't *trigger* automounts Askar Safin
2025-08-17 17:15 ` [PATCH 1/4] vfs: fs/namei.c: move cross-device check to traverse_mounts Askar Safin
2025-08-17 17:15 ` [PATCH 2/4] vfs: fs/namei.c: remove LOOKUP_NO_XDEV check from handle_mounts Askar Safin
2025-08-17 18:00   ` Al Viro [this message]
2025-08-17 17:15 ` [PATCH 3/4] vfs: fs/namei.c: move cross-device check to __traverse_mounts Askar Safin
2025-08-17 17:15 ` [PATCH 4/4] vfs: fs/namei.c: if RESOLVE_NO_XDEV passed to openat2, don't *trigger* automounts Askar Safin
2025-08-17 17:53   ` Al Viro
2025-08-17 17:54     ` Al Viro
2025-08-18  5:17   ` Aleksa Sarai
2025-08-18  7:15     ` Aleksa Sarai
2025-08-25 17:48       ` Askar Safin
2025-08-18  5:31 ` [PATCH 0/4] vfs: " Aleksa Sarai
2025-08-19  8:21   ` Christian Brauner
2025-08-25 12:46     ` Askar Safin
2025-08-25 13:14       ` Christian Brauner
2025-08-19  8:24 ` Christian Brauner
2025-08-20 18:04   ` Askar Safin

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=20250817180057.GA222315@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=autofs@vger.kernel.org \
    --cc=brauner@kernel.org \
    --cc=cyphar@cyphar.com \
    --cc=dhowells@redhat.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=raven@themaw.net \
    --cc=safinaskar@zohomail.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