Commit 4864d59e authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

criu/mount.c: fix printing errno

An errno from setns might be lost after close()s, so change the order.

travis-ci: success for Assorted nitpicks
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 6326b5c7
...@@ -2772,9 +2772,9 @@ int depopulate_roots_yard(int mntns_fd, bool clean_remaps) ...@@ -2772,9 +2772,9 @@ int depopulate_roots_yard(int mntns_fd, bool clean_remaps)
return -1; return -1;
} }
if (setns(mntns_fd, CLONE_NEWNS) < 0) { if (setns(mntns_fd, CLONE_NEWNS) < 0) {
pr_perror("`- Can't switch");
close(old_ns); close(old_ns);
close(old_cwd); close(old_cwd);
pr_perror("`- Can't switch");
return -1; return -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment