[CRIU] [PATCH 07/16] fix mount: save mount tree for each namespace
Andrey Vagin
avagin at openvz.org
Tue Apr 8 16:34:59 PDT 2014
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
include/namespaces.h | 5 ++++-
mount.c | 7 ++++---
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/include/namespaces.h b/include/namespaces.h
index 315dfef..b0faf8c 100644
--- a/include/namespaces.h
+++ b/include/namespaces.h
@@ -17,7 +17,10 @@ struct ns_id {
struct ns_id *next;
futex_t created; /* boolean */
union {
- struct mount_info *mount_info_head;
+ struct {
+ struct mount_info *mntinfo;
+ struct mount_info *mntinfo_tree;
+ } mnt;
};
};
extern struct ns_id *ns_ids;
diff --git a/mount.c b/mount.c
index d4c06a5..3f90e0b 100644
--- a/mount.c
+++ b/mount.c
@@ -880,7 +880,10 @@ int dump_mnt_ns(struct ns_id *ns)
goto err;
}
- if (mnt_build_tree(pm) == NULL)
+ ns->mnt.mntinfo = pm;
+
+ ns->mnt.mntinfo_tree = mnt_build_tree(pm);
+ if (ns->mnt.mntinfo_tree == NULL)
goto err;
if (validate_mounts(pm, true))
@@ -888,8 +891,6 @@ int dump_mnt_ns(struct ns_id *ns)
pr_info("Dumping mountpoints\n");
- ns->mount_info_head = pm;
-
do {
struct mount_info *n = pm->next;
--
1.8.5.3
More information about the CRIU
mailing list