Blob Blame History Raw
From aab7439cca03f04107e1783d43f9dc898a7bea11 Mon Sep 17 00:00:00 2001
From: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Date: Fri, 29 May 2020 13:00:48 +0300
Subject: [PATCH 191/245] mount: use ns_mountpoint in
 validate_children_collision

Function validate_children_collision is both called on dump and on
restore. On dump mountpoint and ns_mountpoint are the same. On restore
as we never call validate_children_collision on helper mounts
(root_yard_mp and cr_time are not in mntinfo list), for all other mounts
strcmp results would be the same with mountpoint and ns_mountpoint.

Cherry-picked from Virtuozzo criu:
https://src.openvz.org/projects/OVZ/repos/criu/commits/8f4fda5ac

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
---
 criu/mount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/criu/mount.c b/criu/mount.c
index fffebe801..3e907172d 100644
--- a/criu/mount.c
+++ b/criu/mount.c
@@ -676,7 +676,7 @@ static int validate_children_collision(struct mount_info *mnt)
 		list_for_each_entry(chj, &mnt->children, siblings) {
 			if (chj == chi)
 				break;
-			if (!strcmp(chj->mountpoint, chi->mountpoint)) {
+			if (!strcmp(chj->ns_mountpoint, chi->ns_mountpoint)) {
 				pr_err("Mount %d has two children with same "
 				       "mountpoint: %d %d\n",
 				       mnt->mnt_id, chj->mnt_id, chi->mnt_id);
-- 
2.35.1