]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
namei: remove LOOKUP_NO_XDEV check from handle_mounts
authorAskar Safin <safinaskar@zohomail.com>
Mon, 25 Aug 2025 18:12:31 +0000 (18:12 +0000)
committerChristian Brauner <brauner@kernel.org>
Tue, 2 Sep 2025 08:40:42 +0000 (10:40 +0200)
This is preparation to RESOLVE_NO_XDEV fix in following commits.
No functional change intended.

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

Signed-off-by: Askar Safin <safinaskar@zohomail.com>
Link: https://lore.kernel.org/20250825181233.2464822-3-safinaskar@zohomail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/namei.c

index f81fdc7bbfedacecacc68bc4105704cd15f56e5a..6e34c3317421980b1262c7742fb4d0003550942d 100644 (file)
@@ -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;
        if (unlikely(ret)) {
                dput(path->dentry);
                if (path->mnt != nd->path.mnt)