2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 22:05:36 +00:00

mount: use ns_mountpoint in mnt_depth

Function mnt_depth is only used on real mounts when building mount tree for
single namespace, thats why we can compare those mounts with ns_mountpoint
safely.

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

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
This commit is contained in:
Pavel Tikhomirov
2020-05-29 15:18:10 +03:00
committed by Andrei Vagin
parent ae0b218c30
commit eedbc6f478

View File

@@ -392,7 +392,7 @@ static unsigned int mnt_depth(struct mount_info *m)
unsigned int depth = 0;
char *c;
for (c = m->mountpoint; *c != '\0'; c++)
for (c = m->ns_mountpoint; *c != '\0'; c++)
if (*c == '/')
depth++;