Commit 9102b08c authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

mount: refactor do_bind_mount()

Signed-off-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent d6d6af9a
......@@ -2271,13 +2271,17 @@ static int restore_ext_mount(struct mount_info *mi)
static int do_bind_mount(struct mount_info *mi)
{
bool shared = 0;
char *root, *cut_root, rpath[PATH_MAX];
bool force_private_remount = false;
unsigned long mflags;
bool shared = 0;
struct stat st;
if (!mi->need_plugin) {
char *root, *cut_root, rpath[PATH_MAX];
unsigned long mflags;
if (mi->need_plugin) {
if (restore_ext_mount(mi))
return -1;
goto out;
}
if (mi->external) {
/*
......@@ -2351,11 +2355,7 @@ do_bind:
}
}
}
} else {
if (restore_ext_mount(mi))
return -1;
}
out:
/*
* shared - the mount is in the same shared group with mi->bind
* mi->shared_id && !shared - create a new shared group
......
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