mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[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
|
@ -82,6 +82,8 @@ void change_mnt_propagation(struct vfsmount *mnt, int type)
|
|||
if (type != MS_SLAVE) {
|
||||
list_del_init(&mnt->mnt_slave);
|
||||
mnt->mnt_master = NULL;
|
||||
if (type == MS_UNBINDABLE)
|
||||
mnt->mnt_flags |= MNT_UNBINDABLE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue