summaryrefslogtreecommitdiff
path: root/include/linux/mount.h
diff options
context:
space:
mode:
authorValerie Aurora <vaurora@redhat.com>2010-01-26 22:20:47 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2010-03-03 22:07:55 +0300
commit495d6c9c6595ec7b37910dfd42634839431d21fd (patch)
tree375a2ea9803a91c5df34df80d7e08119d9772240 /include/linux/mount.h
parent2ecdc82ef0b03e67ce5ecee79d0d108177a704df (diff)
downloadlinux-495d6c9c6595ec7b37910dfd42634839431d21fd.tar.xz
VFS: Clean up shared mount flag propagation
The handling of mount flags in set_mnt_shared() got a little tangled up during previous cleanups, with the following problems: * MNT_PNODE_MASK is defined as a literal constant when it should be a bitwise xor of other MNT_* flags * set_mnt_shared() clears and then sets MNT_SHARED (part of MNT_PNODE_MASK) * MNT_PNODE_MASK could use a comment in mount.h * MNT_PNODE_MASK is a terrible name, change to MNT_SHARED_MASK This patch fixes these problems. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/mount.h')
-rw-r--r--include/linux/mount.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/mount.h b/include/linux/mount.h
index 5d5275364867..375d43a5d802 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -34,7 +34,16 @@ struct mnt_namespace;
#define MNT_SHARED 0x1000 /* if the vfsmount is a shared mount */
#define MNT_UNBINDABLE 0x2000 /* if the vfsmount is a unbindable mount */
-#define MNT_PNODE_MASK 0x3000 /* propagation flag mask */
+/*
+ * MNT_SHARED_MASK is the set of flags that should be cleared when a
+ * mount becomes shared. Currently, this is only the flag that says a
+ * mount cannot be bind mounted, since this is how we create a mount
+ * that shares events with another mount. If you add a new MNT_*
+ * flag, consider how it interacts with shared mounts.
+ */
+#define MNT_SHARED_MASK (MNT_UNBINDABLE)
+#define MNT_PROPAGATION_MASK (MNT_SHARED | MNT_UNBINDABLE)
+
struct vfsmount {
struct list_head mnt_hash;