aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-03-04 18:12:57 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-03-05 15:27:01 -0500
commit7e03b7cc0736eefe7471782c344112ad6eba951e (patch)
tree691426bfac629a9e463d543518e8223a5af4c7f0 /fs/nfs/super.c
parent91e56aaedd7ebceacde782a3921fadef4b5d0e1c (diff)
NFS: Fix a compile issue when !CONFIG_NFS_V4_1
The attempt to display the implementation ID needs to be conditional on whether or not CONFIG_NFS_V4_1 is defined Reported-by: Bryan Schumaker <Bryan.Schumaker@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r--fs/nfs/super.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 3935a371f5a0..aac403085be5 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -775,7 +775,6 @@ static void show_sessions(struct seq_file *m, struct nfs_server *server) {}
775#endif 775#endif
776#endif 776#endif
777 777
778#ifdef CONFIG_NFS_V4
779#ifdef CONFIG_NFS_V4_1 778#ifdef CONFIG_NFS_V4_1
780static void show_pnfs(struct seq_file *m, struct nfs_server *server) 779static void show_pnfs(struct seq_file *m, struct nfs_server *server)
781{ 780{
@@ -785,9 +784,26 @@ static void show_pnfs(struct seq_file *m, struct nfs_server *server)
785 else 784 else
786 seq_printf(m, "not configured"); 785 seq_printf(m, "not configured");
787} 786}
787
788static void show_implementation_id(struct seq_file *m, struct nfs_server *nfss)
789{
790 if (nfss->nfs_client && nfss->nfs_client->impl_id) {
791 struct nfs41_impl_id *impl_id = nfss->nfs_client->impl_id;
792 seq_printf(m, "\n\timpl_id:\tname='%s',domain='%s',"
793 "date='%llu,%u'",
794 impl_id->name, impl_id->domain,
795 impl_id->date.seconds, impl_id->date.nseconds);
796 }
797}
788#else 798#else
789static void show_pnfs(struct seq_file *m, struct nfs_server *server) {} 799#ifdef CONFIG_NFS_V4
800static void show_pnfs(struct seq_file *m, struct nfs_server *server)
801{
802}
790#endif 803#endif
804static void show_implementation_id(struct seq_file *m, struct nfs_server *nfss)
805{
806}
791#endif 807#endif
792 808
793static int nfs_show_devname(struct seq_file *m, struct dentry *root) 809static int nfs_show_devname(struct seq_file *m, struct dentry *root)
@@ -836,13 +852,7 @@ static int nfs_show_stats(struct seq_file *m, struct dentry *root)
836 852
837 seq_printf(m, "\n\tage:\t%lu", (jiffies - nfss->mount_time) / HZ); 853 seq_printf(m, "\n\tage:\t%lu", (jiffies - nfss->mount_time) / HZ);
838 854
839 if (nfss->nfs_client && nfss->nfs_client->impl_id) { 855 show_implementation_id(m, nfss);
840 struct nfs41_impl_id *impl_id = nfss->nfs_client->impl_id;
841 seq_printf(m, "\n\timpl_id:\tname='%s',domain='%s',"
842 "date='%llu,%u'",
843 impl_id->name, impl_id->domain,
844 impl_id->date.seconds, impl_id->date.nseconds);
845 }
846 856
847 seq_printf(m, "\n\tcaps:\t"); 857 seq_printf(m, "\n\tcaps:\t");
848 seq_printf(m, "caps=0x%x", nfss->caps); 858 seq_printf(m, "caps=0x%x", nfss->caps);