mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
reorganize do_make_slave()
Make sure that clone_mnt() never returns a mount with MNT_SHARED in flags, but without a valid ->mnt_group_id. That allows to demystify do_make_slave() quite a bit, among other things. Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
066715d3fd
commit
5235d448c4
2 changed files with 38 additions and 38 deletions
|
|
@ -1030,6 +1030,8 @@ static struct mount *clone_mnt(struct mount *old, struct dentry *root,
|
|||
if (IS_MNT_SLAVE(old))
|
||||
list_add(&mnt->mnt_slave, &old->mnt_slave);
|
||||
mnt->mnt_master = old->mnt_master;
|
||||
} else {
|
||||
CLEAR_MNT_SHARED(mnt);
|
||||
}
|
||||
if (flag & CL_MAKE_SHARED)
|
||||
set_mnt_shared(mnt);
|
||||
|
|
|
|||
Loading…
Reference in a new issue