2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

mnt: Move ns_fd assignment down in prepare_mnt_ns()

No functional changes.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Kirill Tkhai
2017-06-28 18:54:16 +03:00
committed by Andrei Vagin
parent bfbd7bbacb
commit a8ab6c569e

View File

@@ -3050,13 +3050,12 @@ int prepare_mnt_ns(void)
pr_perror("Can't restore mntns back"); pr_perror("Can't restore mntns back");
goto err; goto err;
} }
nsid->mnt.ns_fd = rst; SWAP(rst, fd);
rst = fd;
} else {
/* Pin one with a file descriptor */
nsid->mnt.ns_fd = fd;
} }
/* Pin one with a file descriptor */
nsid->mnt.ns_fd = fd;
/* Set its root */ /* Set its root */
path[0] = '/'; path[0] = '/';
print_ns_root(nsid, 0, path + 1, sizeof(path) - 1); print_ns_root(nsid, 0, path + 1, sizeof(path) - 1);