Commit 30ecf44f authored by Tycho Andersen's avatar Tycho Andersen Committed by Pavel Emelyanov

mnt: do_new_mount should restore sharing

The function masks off sharing in the initial setting, but doesn't correctly
reset the flags afterwards.

CC: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
Acked-by: 's avatarAndrew Vagin <avagin@odin.com>
Looks-good-to: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 7e93eb3b
...@@ -1852,7 +1852,9 @@ static int do_new_mount(struct mount_info *mi) ...@@ -1852,7 +1852,9 @@ static int do_new_mount(struct mount_info *mi)
return -1; return -1;
} }
if (restore_shared_options(mi, 0, mi->shared_id, 0)) if (restore_shared_options(mi, !mi->shared_id && !mi->master_id,
mi->shared_id,
mi->master_id))
return -1; return -1;
mi->mounted = true; mi->mounted = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment