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

mount: set is_ns_root on dump

It is required to not dump content of the root mount in dump_one_fd().

travis-ci: success for Fix a few issues to dump/restore Docker containers with userns
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
Andrei Vagin
2016-10-26 23:55:24 +03:00
committed by Pavel Emelyanov
parent c64ebbcc44
commit 606d88f9ac

View File

@@ -37,6 +37,7 @@
#include "cgroup.h" #include "cgroup.h"
#include "cgroup-props.h" #include "cgroup-props.h"
#include "timerfd.h" #include "timerfd.h"
#include "path.h"
#include "protobuf.h" #include "protobuf.h"
#include "images/fdinfo.pb-c.h" #include "images/fdinfo.pb-c.h"
@@ -1318,6 +1319,7 @@ static int parse_mountinfo_ent(char *str, struct mount_info *new, char **fsname)
if (!new->mountpoint) if (!new->mountpoint)
goto err; goto err;
new->ns_mountpoint = new->mountpoint; new->ns_mountpoint = new->mountpoint;
new->is_ns_root = is_root(new->ns_mountpoint + 1);
new->s_dev = new->s_dev_rt = MKKDEV(kmaj, kmin); new->s_dev = new->s_dev_rt = MKKDEV(kmaj, kmin);
new->flags = 0; new->flags = 0;