From patchwork Fri Oct 28 07:19:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [4/4] mount: set is_ns_root on dump From: Andrei Vagin X-Patchwork-Id: 2276 Message-Id: <1477639147-17491-5-git-send-email-avagin@openvz.org> To: xemul@virtuozzo.com Cc: criu@openvz.org, Andrei Vagin Date: Fri, 28 Oct 2016 10:19:07 +0300 From: Andrei Vagin It is required to not dump content of the root mount in dump_one_fd(). Signed-off-by: Andrei Vagin --- criu/proc_parse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/criu/proc_parse.c b/criu/proc_parse.c index c73798a..0a0de7d 100644 --- a/criu/proc_parse.c +++ b/criu/proc_parse.c @@ -37,6 +37,7 @@ #include "cgroup.h" #include "cgroup-props.h" #include "timerfd.h" +#include "path.h" #include "protobuf.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) goto err; 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->flags = 0;