[CRIU] [PATCH 34/39] restore: set buildinfo_tree for each mount namespace

Andrey Vagin avagin at openvz.org
Mon Apr 21 07:23:44 PDT 2014


On restore all namespaces are restored as one tree and
a pointer on the root of this tree will be set on each namespace.

Below you can find a call trace, where it's used:

Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 mount.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/mount.c b/mount.c
index 056bbb2..272718f 100644
--- a/mount.c
+++ b/mount.c
@@ -1672,6 +1672,7 @@ static int prepare_temporary_roots()
 static int populate_mnt_ns(int ns_pid, struct mount_info *mis)
 {
 	struct mount_info *pms;
+	struct ns_id *nsid;
 
 	mntinfo_tree = NULL;
 	mntinfo = mis;
@@ -1683,6 +1684,13 @@ static int populate_mnt_ns(int ns_pid, struct mount_info *mis)
 	if (!pms)
 		return -1;
 
+	for (nsid = ns_ids; nsid; nsid = nsid->next) {
+		if (nsid->nd != &mnt_ns_desc)
+			continue;
+
+		nsid->mnt.mntinfo_tree = pms;
+	}
+
 	if (validate_mounts(mis, false))
 		return -1;
 
-- 
1.8.5.3



More information about the CRIU mailing list