diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2023-10-25 16:02:01 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-11-18 14:56:16 +0100 |
commit | 56c94c626785001dbb683312725b7d87c6ec6a91 (patch) | |
tree | faefe8f7ce06290bf63a5a72928062601a34b439 /fs/proc_namespace.c | |
parent | mounts: keep list of mounts in an rbtree (diff) | |
download | linux-56c94c626785001dbb683312725b7d87c6ec6a91.tar.xz linux-56c94c626785001dbb683312725b7d87c6ec6a91.zip |
namespace: extract show_path() helper
To be used by the statmount(2) syscall as well.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Link: https://lore.kernel.org/r/20231025140205.3586473-4-mszeredi@redhat.com
Reviewed-by: Ian Kent <raven@themaw.net>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/proc_namespace.c')
-rw-r--r-- | fs/proc_namespace.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/proc_namespace.c b/fs/proc_namespace.c index 73d2274d5f59..0a808951b7d3 100644 --- a/fs/proc_namespace.c +++ b/fs/proc_namespace.c @@ -142,13 +142,9 @@ static int show_mountinfo(struct seq_file *m, struct vfsmount *mnt) seq_printf(m, "%i %i %u:%u ", r->mnt_id, r->mnt_parent->mnt_id, MAJOR(sb->s_dev), MINOR(sb->s_dev)); - if (sb->s_op->show_path) { - err = sb->s_op->show_path(m, mnt->mnt_root); - if (err) - goto out; - } else { - seq_dentry(m, mnt->mnt_root, " \t\n\\"); - } + err = show_path(m, mnt->mnt_root); + if (err) + goto out; seq_putc(m, ' '); /* mountpoints outside of chroot jail will give SEQ_SKIP on this */ |