[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>
This commit is contained in:
parent
5afe002213
commit
9676f0c638
5 changed files with 67 additions and 26 deletions
|
@ -104,6 +104,7 @@ extern int dir_notify_enable;
|
|||
#define MS_MOVE 8192
|
||||
#define MS_REC 16384
|
||||
#define MS_VERBOSE 32768
|
||||
#define MS_UNBINDABLE (1<<17) /* change to unbindable */
|
||||
#define MS_PRIVATE (1<<18) /* change to private */
|
||||
#define MS_SLAVE (1<<19) /* change to slave */
|
||||
#define MS_SHARED (1<<20) /* change to shared */
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#define MNT_NODEV 0x02
|
||||
#define MNT_NOEXEC 0x04
|
||||
#define MNT_SHARED 0x10 /* if the vfsmount is a shared mount */
|
||||
#define MNT_UNBINDABLE 0x20 /* if the vfsmount is a unbindable mount */
|
||||
#define MNT_PNODE_MASK 0x30 /* propogation flag mask */
|
||||
|
||||
struct vfsmount {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue