diff options
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r-- | fs/nfs/super.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index a6ab483c9ad0..79bc61fe2868 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -263,6 +263,8 @@ static match_table_t nfs_local_lock_tokens = { | |||
263 | static void nfs_umount_begin(struct super_block *); | 263 | static void nfs_umount_begin(struct super_block *); |
264 | static int nfs_statfs(struct dentry *, struct kstatfs *); | 264 | static int nfs_statfs(struct dentry *, struct kstatfs *); |
265 | static int nfs_show_options(struct seq_file *, struct vfsmount *); | 265 | static int nfs_show_options(struct seq_file *, struct vfsmount *); |
266 | static int nfs_show_devname(struct seq_file *, struct vfsmount *); | ||
267 | static int nfs_show_path(struct seq_file *, struct vfsmount *); | ||
266 | static int nfs_show_stats(struct seq_file *, struct vfsmount *); | 268 | static int nfs_show_stats(struct seq_file *, struct vfsmount *); |
267 | static int nfs_get_sb(struct file_system_type *, int, const char *, void *, struct vfsmount *); | 269 | static int nfs_get_sb(struct file_system_type *, int, const char *, void *, struct vfsmount *); |
268 | static struct dentry *nfs_xdev_mount(struct file_system_type *fs_type, | 270 | static struct dentry *nfs_xdev_mount(struct file_system_type *fs_type, |
@@ -296,6 +298,8 @@ static const struct super_operations nfs_sops = { | |||
296 | .evict_inode = nfs_evict_inode, | 298 | .evict_inode = nfs_evict_inode, |
297 | .umount_begin = nfs_umount_begin, | 299 | .umount_begin = nfs_umount_begin, |
298 | .show_options = nfs_show_options, | 300 | .show_options = nfs_show_options, |
301 | .show_devname = nfs_show_devname, | ||
302 | .show_path = nfs_show_path, | ||
299 | .show_stats = nfs_show_stats, | 303 | .show_stats = nfs_show_stats, |
300 | .remount_fs = nfs_remount, | 304 | .remount_fs = nfs_remount, |
301 | }; | 305 | }; |
@@ -366,6 +370,8 @@ static const struct super_operations nfs4_sops = { | |||
366 | .evict_inode = nfs4_evict_inode, | 370 | .evict_inode = nfs4_evict_inode, |
367 | .umount_begin = nfs_umount_begin, | 371 | .umount_begin = nfs_umount_begin, |
368 | .show_options = nfs_show_options, | 372 | .show_options = nfs_show_options, |
373 | .show_devname = nfs_show_devname, | ||
374 | .show_path = nfs_show_path, | ||
369 | .show_stats = nfs_show_stats, | 375 | .show_stats = nfs_show_stats, |
370 | .remount_fs = nfs_remount, | 376 | .remount_fs = nfs_remount, |
371 | }; | 377 | }; |
@@ -726,6 +732,28 @@ static int nfs_show_options(struct seq_file *m, struct vfsmount *mnt) | |||
726 | return 0; | 732 | return 0; |
727 | } | 733 | } |
728 | 734 | ||
735 | static int nfs_show_devname(struct seq_file *m, struct vfsmount *mnt) | ||
736 | { | ||
737 | char *page = (char *) __get_free_page(GFP_KERNEL); | ||
738 | char *devname, *dummy; | ||
739 | int err = 0; | ||
740 | if (!page) | ||
741 | return -ENOMEM; | ||
742 | devname = nfs_path(&dummy, mnt->mnt_root, page, PAGE_SIZE); | ||
743 | if (IS_ERR(devname)) | ||
744 | err = PTR_ERR(devname); | ||
745 | else | ||
746 | seq_escape(m, devname, " \t\n\\"); | ||
747 | free_page((unsigned long)page); | ||
748 | return err; | ||
749 | } | ||
750 | |||
751 | static int nfs_show_path(struct seq_file *m, struct vfsmount *mnt) | ||
752 | { | ||
753 | seq_puts(m, "/"); | ||
754 | return 0; | ||
755 | } | ||
756 | |||
729 | /* | 757 | /* |
730 | * Present statistical information for this VFS mountpoint | 758 | * Present statistical information for this VFS mountpoint |
731 | */ | 759 | */ |