diff options
author | Andries E. Brouwer <Andries.Brouwer@cwi.nl> | 2008-02-06 04:36:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 13:41:02 -0500 |
commit | 0b03cfb25fa944bc106e816146846dcb48b2e907 (patch) | |
tree | e9e6ad93e71008134bdf8f42e316db5406c88451 | |
parent | 870b8f8c43d000bb321b42a12212facc1087a748 (diff) |
MNT_UNBINDABLE fix
Some time ago ( http://lkml.org/lkml/2007/6/19/128 ) I wrote about
MNT_UNBINDABLE that it felt like a bug that it is not reset by "mount
--make-private".
Today I happened to see mount(8) and Documentation/sharedsubtree.txt and
both document the version obtained by applying the little patch given in
the above (and again below).
So, the present kernel code is not according to specs and must be regarded
as buggy.
Specification in Documentation/sharedsubtree.txt:
See state diagram: unbindable should become private upon make-private.
Specification in mount(8):
... It's
also possible to set up uni-directional propagation (with --make-
slave), to make a mount point unavailable for --bind/--rbind (with
--make-unbindable), and to undo any of these (with --make-private).
Repeat of old fix-shared-subtrees-make-private.patch
(due to Dirk Gerrits, René Gabriëls, Peter Kooijmans):
Acked-by: Ram Pai <linuxram@us.ibm.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/pnode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/pnode.c b/fs/pnode.c index 89940f243fc2..05ba692bc540 100644 --- a/fs/pnode.c +++ b/fs/pnode.c | |||
@@ -83,6 +83,8 @@ void change_mnt_propagation(struct vfsmount *mnt, int type) | |||
83 | mnt->mnt_master = NULL; | 83 | mnt->mnt_master = NULL; |
84 | if (type == MS_UNBINDABLE) | 84 | if (type == MS_UNBINDABLE) |
85 | mnt->mnt_flags |= MNT_UNBINDABLE; | 85 | mnt->mnt_flags |= MNT_UNBINDABLE; |
86 | else | ||
87 | mnt->mnt_flags &= ~MNT_UNBINDABLE; | ||
86 | } | 88 | } |
87 | } | 89 | } |
88 | 90 | ||