mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-29 04:50:26 +00:00
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: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
1b3fa9bc25
commit
3e50d70cd9
1 changed files with 3 additions and 1 deletions
4
mount.c
4
mount.c
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue