Commit 58b3b9ee authored by Kirill Tkhai's avatar Kirill Tkhai Committed by Andrei Vagin

mnt: Move ns_fd assignment down in prepare_mnt_ns()

No functional changes.
Signed-off-by: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent d433a3e9
...@@ -3283,12 +3283,11 @@ int prepare_mnt_ns(void) ...@@ -3283,12 +3283,11 @@ 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 */ /* Pin one with a file descriptor */
nsid->mnt.ns_fd = fd; nsid->mnt.ns_fd = fd;
}
/* Set its root */ /* Set its root */
path[0] = '/'; path[0] = '/';
......
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