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

mount: Close old service descriptor in mntns_collect_root

We're about to collect root several times in a row, so keeping
the old one isn't required.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Andrey Vagin
2014-04-21 18:23:11 +04:00
committed by Pavel Emelyanov
parent e8ac085af8
commit 67456e90ac

View File

@@ -1531,6 +1531,8 @@ int mntns_collect_root(pid_t pid)
int ret;
char path[PATH_MAX + 1];
close_service_fd(ROOT_FD_OFF);
if (!(current_ns_mask & CLONE_NEWNS)) {
/*
* If criu and tasks we dump live in the same mount