Commit ee9258e8 authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

mount: take into account btrfs workaround for converting st_dev to phys_dev

BTRFS returns subvolume dev-id instead of superblock dev-id
Signed-off-by: 's avatarAndrew Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent b664bb14
...@@ -469,6 +469,7 @@ static struct mount_info *mnt_build_tree(struct mount_info *list) ...@@ -469,6 +469,7 @@ static struct mount_info *mnt_build_tree(struct mount_info *list)
*/ */
static int __open_mountpoint(struct mount_info *pm, int mnt_fd) static int __open_mountpoint(struct mount_info *pm, int mnt_fd)
{ {
dev_t dev;
struct stat st; struct stat st;
int ret; int ret;
...@@ -490,9 +491,10 @@ static int __open_mountpoint(struct mount_info *pm, int mnt_fd) ...@@ -490,9 +491,10 @@ static int __open_mountpoint(struct mount_info *pm, int mnt_fd)
goto err; goto err;
} }
if (st.st_dev != kdev_to_odev(pm->s_dev)) { dev = phys_stat_resolve_dev(st.st_dev, pm->mountpoint + 1);
if (dev != pm->s_dev) {
pr_err("The file system %#x (%#x) %s %s is inaccessible\n", pr_err("The file system %#x (%#x) %s %s is inaccessible\n",
pm->s_dev, (int)st.st_dev, pm->fstype->name, pm->mountpoint); pm->s_dev, (int)dev, pm->fstype->name, pm->mountpoint);
goto err; 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