diff --git a/include/mount.h b/include/mount.h index 98bc397d6..876928ac5 100644 --- a/include/mount.h +++ b/include/mount.h @@ -28,8 +28,8 @@ extern struct ns_desc mnt_ns_desc; extern dev_t phys_stat_resolve_dev(struct mount_info *tree, dev_t st_dev, const char *path); -extern bool phys_stat_dev_match(struct mount_info *tree, dev_t st_dev, - dev_t phys_dev, const char *path); +extern bool phys_stat_dev_match(dev_t st_dev, dev_t phys_dev, + struct ns_id *, const char *path); struct pstree_item; extern int restore_task_mnt_ns(struct pstree_item *); diff --git a/mount.c b/mount.c index 6393bc39e..58e4d8fc7 100644 --- a/mount.c +++ b/mount.c @@ -207,13 +207,13 @@ dev_t phys_stat_resolve_dev(struct mount_info *tree, MKKDEV(major(st_dev), minor(st_dev)) : m->s_dev; } -bool phys_stat_dev_match(struct mount_info *tree, dev_t st_dev, - dev_t phys_dev, const char *path) +bool phys_stat_dev_match(dev_t st_dev, dev_t phys_dev, + struct ns_id *ns, const char *path) { if (st_dev == kdev_to_odev(phys_dev)) return true; - return phys_dev == phys_stat_resolve_dev(tree, st_dev, path); + return phys_dev == phys_stat_resolve_dev(ns->mnt.mntinfo_tree, st_dev, path); } /* diff --git a/sk-unix.c b/sk-unix.c index 61b5857b9..f205d8f46 100644 --- a/sk-unix.c +++ b/sk-unix.c @@ -440,8 +440,8 @@ static int unix_collect_one(const struct unix_diag_msg *m, name, m->udiag_ino); drop_path = true; } else if ((st.st_ino != uv->udiag_vfs_ino) || - !phys_stat_dev_match(ns->mnt.mntinfo_tree, st.st_dev, - uv->udiag_vfs_dev, name)) { + !phys_stat_dev_match(st.st_dev, + uv->udiag_vfs_dev, ns, name)) { pr_info("unix: Dropping path %s for " "unlinked bound " "sk %#x.%#x real %#x.%#x\n",