X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=kernel%2Ffs%2Fnsfs.c;h=8f20d6016e205d341b82e31025961e8c9f6c6963;hb=69801e7ea3995cafcbf7d621e2e2b422732f7b47;hp=99521e7c492b087d67bfdf2a6d2a929c23014988;hpb=9ca8dbcc65cfc63d6f5ef3312a33184e1d726e00;p=kvmfornfv.git diff --git a/kernel/fs/nsfs.c b/kernel/fs/nsfs.c index 99521e7c4..8f20d6016 100644 --- a/kernel/fs/nsfs.c +++ b/kernel/fs/nsfs.c @@ -4,6 +4,7 @@ #include #include #include +#include static struct vfsmount *nsfs_mnt; @@ -136,9 +137,19 @@ out_invalid: return ERR_PTR(-EINVAL); } +static int nsfs_show_path(struct seq_file *seq, struct dentry *dentry) +{ + struct inode *inode = d_inode(dentry); + const struct proc_ns_operations *ns_ops = dentry->d_fsdata; + + seq_printf(seq, "%s:[%lu]", ns_ops->name, inode->i_ino); + return 0; +} + static const struct super_operations nsfs_ops = { .statfs = simple_statfs, .evict_inode = nsfs_evict, + .show_path = nsfs_show_path, }; static struct dentry *nsfs_mount(struct file_system_type *fs_type, int flags, const char *dev_name, void *data)