mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
mount: add helper mntns_get_root_by_mnt_id
Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
e4e22a00f7
commit
967dba606a
@@ -676,7 +676,6 @@ int open_path(struct file_desc *d,
|
||||
int(*open_cb)(int mntns_root, struct reg_file_info *, void *), void *arg)
|
||||
{
|
||||
struct reg_file_info *rfi;
|
||||
struct ns_id *ns;
|
||||
int tmp, mntns_root;
|
||||
char *orig_path = NULL;
|
||||
|
||||
@@ -722,12 +721,7 @@ int open_path(struct file_desc *d,
|
||||
}
|
||||
}
|
||||
|
||||
ns = lookup_nsid_by_mnt_id(rfi->rfe->mnt_id);
|
||||
if (ns == NULL)
|
||||
return -1;
|
||||
|
||||
mntns_root = mntns_get_root_fd(ns);
|
||||
|
||||
mntns_root = mntns_get_root_by_mnt_id(rfi->rfe->mnt_id);
|
||||
tmp = open_cb(mntns_root, rfi, arg);
|
||||
if (tmp < 0) {
|
||||
pr_perror("Can't open file %s", rfi->path);
|
||||
|
Reference in New Issue
Block a user