Commit 8239be8f authored by Tycho Andersen's avatar Tycho Andersen Committed by Pavel Emelyanov

mount: support recursive bind mounts

The inital mount() call for a bind mount needs to have the MS_REC flag
present if the bind mount is recursive.
Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 78948f96
......@@ -2590,7 +2590,7 @@ do_bind:
}
}
if (mount(root, mi->mountpoint, NULL, MS_BIND, NULL) < 0) {
if (mount(root, mi->mountpoint, NULL, MS_BIND | (mi->flags & MS_REC), NULL) < 0) {
pr_perror("Can't mount at %s", mi->mountpoint);
goto err;
}
......
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