2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 22:05:36 +00:00

mount: don't use phys_stat_resolve_dev() in open_mount()

We don't need to look up a mount info element, because
we already have it there.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Andrei Vagin
2017-06-06 09:50:57 +03:00
parent 4671d74260
commit 82cb4b4bd4

View File

@@ -1019,8 +1019,8 @@ int mnt_is_dir(struct mount_info *pm)
*/
int __open_mountpoint(struct mount_info *pm, int mnt_fd)
{
dev_t dev;
struct stat st;
int dev;
int ret;
if (mnt_fd == -1) {
@@ -1049,7 +1049,7 @@ int __open_mountpoint(struct mount_info *pm, int mnt_fd)
goto err;
}
dev = phys_stat_resolve_dev(pm->nsid, st.st_dev, pm->ns_mountpoint + 1);
dev = MKKDEV(major(st.st_dev), minor(st.st_dev));
/*
* Always check for @s_dev_rt here, because the @s_dev
* from the image (in case of restore) has all rights
@@ -1058,7 +1058,7 @@ int __open_mountpoint(struct mount_info *pm, int mnt_fd)
*/
if (dev != pm->s_dev_rt) {
pr_err("The file system %#x %#x (%#x) %s %s is inaccessible\n",
pm->s_dev, pm->s_dev_rt, (int)dev,
pm->s_dev, pm->s_dev_rt, dev,
pm->fstype->name, pm->ns_mountpoint);
goto err;
}