Commit 82cb4b4b authored by Andrei Vagin's avatar Andrei Vagin

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: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 4671d742
......@@ -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;
}
......
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