path: root/fs/pnode.c
diff options
authorRam Pai <linuxram@us.ibm.com>2005-11-07 17:21:20 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 18:18:11 -0800
commit9676f0c6389b62bd6b24d77d4b3abdbcfa32d0f2 (patch)
treefd7d965c6d646cf7e4cfd35e866723927f6cfe8b /fs/pnode.c
parent5afe00221389998a25d611dc7941c06580c29eb6 (diff)
[PATCH] unbindable mounts
An unbindable mount does not forward or receive propagation. Also unbindable mount disallows bind mounts. The semantics is as follows. Bind semantics: It is invalid to bind mount an unbindable mount. Move semantics: It is invalid to move an unbindable mount under shared mount. Clone-namespace semantics: If a mount is unbindable in the parent namespace, the corresponding cloned mount in the child namespace becomes unbindable too. Note: there is subtle difference, unbindable mounts cannot be bind mounted but can be cloned during clone-namespace. Signed-off-by: Ram Pai <linuxram@us.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/pnode.c')
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/pnode.c b/fs/pnode.c
index 3e266c5a307..aeeec8ba8dd 100644
--- a/fs/pnode.c
+++ b/fs/pnode.c
@@ -82,6 +82,8 @@ void change_mnt_propagation(struct vfsmount *mnt, int type)
if (type != MS_SLAVE) {
mnt->mnt_master = NULL;
+ if (type == MS_UNBINDABLE)
+ mnt->mnt_flags |= MNT_UNBINDABLE;