Commit 3e50d70c authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

mounts: mntns_collect_root in __open_mountpoint

We are going to support nested mount namespaces,
file descriptors can be from different namespaces,
so a namespace root must be updated for each of them.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 1b3fa9bc
......@@ -491,7 +491,9 @@ static int __open_mountpoint(struct mount_info *pm, int mnt_fd)
if (mnt_fd == -1) {
int mntns_root;
mntns_root = get_service_fd(ROOT_FD_OFF);
mntns_root = mntns_collect_root(pm->nsid->pid);
if (mntns_root < 0)
return -1;
mnt_fd = openat(mntns_root, pm->mountpoint, O_RDONLY);
if (mnt_fd < 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