aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2025-06-01 00:34:32 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2025-06-29 18:13:41 -0400
commitcf53a2d423c11ed70611e7b3f0878d6e419e348a (patch)
tree4eac9bb2eb1994e373f2ae581564b25c7d55705d
parentffdc52fbbd5835a936ad683c943d6d103a2d4514 (diff)
downloadrandom-cf53a2d423c11ed70611e7b3f0878d6e419e348a.tar.gz
copy_tree(): don't set ->mnt_mountpoint on the root of copy
It never made any sense - neither when copy_tree() had been introduced (2.4.11-pre5), nor at any point afterwards. Mountpoint is meaningless without parent mount and the root of copied tree has no parent until we get around to attaching it somewhere. At that time we'll have mountpoint set; before that we have no idea which dentry will be used as mountpoint. IOW, copy_tree() should just leave the default value. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/namespace.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 9b732d74c2cc7b..f0a56dbceff907 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2222,7 +2222,6 @@ struct mount *copy_tree(struct mount *src_root, struct dentry *dentry,
return dst_mnt;
src_parent = src_root;
- dst_mnt->mnt_mountpoint = src_root->mnt_mountpoint;
list_for_each_entry(src_root_child, &src_root->mnt_mounts, mnt_child) {
if (!is_subdir(src_root_child->mnt_mountpoint, dentry))