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

mounts: handle device numbers in different formats properly

We have two formats for devices and we had to use proper
helpers for them and compare values of a one format.
Signed-off-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent f8ea08bb
......@@ -191,7 +191,7 @@ struct mount_info *lookup_overlayfs(char *rpath, unsigned int st_dev,
/* If the mnt_id and device number match for some entry, no fixup is needed */
for (m = mntinfo; m != NULL; m = m->next)
if (st_dev == m->s_dev && mnt_id == m->mnt_id)
if (st_dev == kdev_to_odev(m->s_dev) && mnt_id == m->mnt_id)
return NULL;
return __lookup_overlayfs(mntinfo, rpath, st_dev, st_ino, mnt_id);
......@@ -1583,7 +1583,8 @@ static int fusectl_dump(struct mount_info *pm)
}
for (it = mntinfo; it; it = it->next) {
if (it->fstype->code == FSTYPE__FUSE && id == minor(it->s_dev) && !it->external) {
if (it->fstype->code == FSTYPE__FUSE &&
id == kdev_minor(it->s_dev) && !it->external) {
pr_err("%s is a fuse mount but not external\n", it->mountpoint);
goto out;
}
......
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