summaryrefslogtreecommitdiff
path: root/fs/pnode.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2025-06-25 14:48:50 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2025-06-29 19:03:46 -0400
commit725ab435ff6e31faca26b8234f9f04c19f772b18 (patch)
treed6c3473ea3f3271eb87c9ec768ea7edd13fbbac6 /fs/pnode.h
parentaab771f34e63ef89e195b63d121abcb55eebfde6 (diff)
get rid of CL_SHARE_TO_SLAVE
the only difference between it and CL_SLAVE is in this predicate in clone_mnt(): if ((flag & CL_SLAVE) || ((flag & CL_SHARED_TO_SLAVE) && IS_MNT_SHARED(old))) { However, in case of CL_SHARED_TO_SLAVE we have not allocated any mount group ids since the time we'd grabbed namespace_sem, so IS_MNT_SHARED() is equivalent to non-zero ->mnt_group_id. And in case of CL_SLAVE old has come either from the original tree, which had ->mnt_group_id allocated for all nodes or from result of sequence of CL_MAKE_SHARED or CL_MAKE_SHARED|CL_SLAVE copies, ultimately going back to the original tree. In both cases we are guaranteed that old->mnt_group_id will be non-zero. In other words, the predicate is always equal to (flags & (CL_SLAVE | CL_SHARED_TO_SLAVE)) && old->mnt_group_id and with that replacement CL_SLAVE and CL_SHARED_TO_SLAVE have exact same behaviour. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/pnode.h')
-rw-r--r--fs/pnode.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/pnode.h b/fs/pnode.h
index 507e30e7a420..00ab153e3e9d 100644
--- a/fs/pnode.h
+++ b/fs/pnode.h
@@ -25,7 +25,6 @@
#define CL_COPY_UNBINDABLE 0x04
#define CL_MAKE_SHARED 0x08
#define CL_PRIVATE 0x10
-#define CL_SHARED_TO_SLAVE 0x20
#define CL_COPY_MNT_NS_FILE 0x40
/*