[CRIU] [PATCH 2/2] mount: support recursive bind mounts
Tycho Andersen
tycho.andersen at canonical.com
Mon May 16 15:30:48 PDT 2016
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: Tycho Andersen <tycho.andersen at canonical.com>
---
criu/mount.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/criu/mount.c b/criu/mount.c
index e85e5d9..30e7203 100644
--- a/criu/mount.c
+++ b/criu/mount.c
@@ -2586,7 +2586,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;
}
--
2.7.4
More information about the CRIU
mailing list