mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:24:31 +01:00
change_mnt_propagation(): do_make_slave() is a no-op unless IS_MNT_SHARED()
... since mnt->mnt_share and mnt->mnt_slave_list are guaranteed to be empty unless IS_MNT_SHARED(mnt). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
d5f15047f1
commit
ef86251194
1 changed files with 4 additions and 5 deletions
|
|
@ -70,10 +70,8 @@ static int do_make_slave(struct mount *mnt)
|
|||
struct mount *master, *slave_mnt;
|
||||
|
||||
if (list_empty(&mnt->mnt_share)) {
|
||||
if (IS_MNT_SHARED(mnt)) {
|
||||
mnt_release_group_id(mnt);
|
||||
CLEAR_MNT_SHARED(mnt);
|
||||
}
|
||||
mnt_release_group_id(mnt);
|
||||
CLEAR_MNT_SHARED(mnt);
|
||||
master = mnt->mnt_master;
|
||||
if (!master) {
|
||||
struct list_head *p = &mnt->mnt_slave_list;
|
||||
|
|
@ -119,7 +117,8 @@ void change_mnt_propagation(struct mount *mnt, int type)
|
|||
set_mnt_shared(mnt);
|
||||
return;
|
||||
}
|
||||
do_make_slave(mnt);
|
||||
if (IS_MNT_SHARED(mnt))
|
||||
do_make_slave(mnt);
|
||||
list_del_init(&mnt->mnt_slave);
|
||||
if (type == MS_SLAVE) {
|
||||
if (mnt->mnt_master)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue