diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2025-08-20 00:26:44 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2025-09-15 21:26:05 -0400 |
| commit | a2bdb7d8dcf20810349e68824f399f5092269cf7 (patch) | |
| tree | 7e26b1a2dec3b520a80a85a5eab1a2055fa4d879 /fs/namespace.c | |
| parent | 6bfb6938e2ffd2ae0b9962aa7cc94c0808eeb100 (diff) | |
pivot_root(2): use old_mp.mp->m_dentry instead of old.dentry
That kills the last place where callers of lock_mount(path, &mp)
used path->dentry.
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namespace.c')
| -rw-r--r-- | fs/namespace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index a931bc9598bd..8c5f5b1edced 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -4670,7 +4670,7 @@ SYSCALL_DEFINE2(pivot_root, const char __user *, new_root, if (!mnt_has_parent(new_mnt)) return -EINVAL; /* absolute root */ /* make sure we can reach put_old from new_root */ - if (!is_path_reachable(old_mnt, old.dentry, &new)) + if (!is_path_reachable(old_mnt, old_mp.mp->m_dentry, &new)) return -EINVAL; /* make certain new is below the root */ if (!is_path_reachable(new_mnt, new.dentry, &root)) |