linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 01/16] NFS: Fix a compile issue when !CONFIG_NFS_V4_1
@ 2012-03-05 23:20 Trond Myklebust
  2012-03-05 23:20 ` [PATCH v3 02/16] NFSv4.1: Fix matching of the stateids when returning a delegation Trond Myklebust
  0 siblings, 1 reply; 16+ messages in thread
From: Trond Myklebust @ 2012-03-05 23:20 UTC (permalink / raw)
  To: linux-nfs

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>
---
 fs/nfs/super.c |   28 +++++++++++++++++++---------
 1 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 3935a37..aac4030 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) {}
 #endif
 #endif
 
-#ifdef CONFIG_NFS_V4
 #ifdef CONFIG_NFS_V4_1
 static void show_pnfs(struct seq_file *m, struct nfs_server *server)
 {
@@ -785,9 +784,26 @@ static void show_pnfs(struct seq_file *m, struct nfs_server *server)
 	else
 		seq_printf(m, "not configured");
 }
+
+static void show_implementation_id(struct seq_file *m, struct nfs_server *nfss)
+{
+	if (nfss->nfs_client && nfss->nfs_client->impl_id) {
+		struct nfs41_impl_id *impl_id = nfss->nfs_client->impl_id;
+		seq_printf(m, "\n\timpl_id:\tname='%s',domain='%s',"
+			   "date='%llu,%u'",
+			   impl_id->name, impl_id->domain,
+			   impl_id->date.seconds, impl_id->date.nseconds);
+	}
+}
 #else
-static void show_pnfs(struct seq_file *m, struct nfs_server *server) {}
+#ifdef CONFIG_NFS_V4
+static void show_pnfs(struct seq_file *m, struct nfs_server *server)
+{
+}
 #endif
+static void show_implementation_id(struct seq_file *m, struct nfs_server *nfss)
+{
+}
 #endif
 
 static 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)
 
 	seq_printf(m, "\n\tage:\t%lu", (jiffies - nfss->mount_time) / HZ);
 
-	if (nfss->nfs_client && nfss->nfs_client->impl_id) {
-		struct nfs41_impl_id *impl_id = nfss->nfs_client->impl_id;
-		seq_printf(m, "\n\timpl_id:\tname='%s',domain='%s',"
-			   "date='%llu,%u'",
-			   impl_id->name, impl_id->domain,
-			   impl_id->date.seconds, impl_id->date.nseconds);
-	}
+	show_implementation_id(m, nfss);
 
 	seq_printf(m, "\n\tcaps:\t");
 	seq_printf(m, "caps=0x%x", nfss->caps);
-- 
1.7.7.6


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-03-05 23:21 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-05 23:20 [PATCH v3 01/16] NFS: Fix a compile issue when !CONFIG_NFS_V4_1 Trond Myklebust
2012-03-05 23:20 ` [PATCH v3 02/16] NFSv4.1: Fix matching of the stateids when returning a delegation Trond Myklebust
2012-03-05 23:20   ` [PATCH v3 03/16] NFSv4: Further clean-ups of delegation stateid validation Trond Myklebust
2012-03-05 23:20     ` [PATCH v3 04/16] NFSv4: Rename encode_stateid() to encode_open_stateid() Trond Myklebust
2012-03-05 23:20       ` [PATCH v3 05/16] NFSv4: Add a helper for encoding opaque data Trond Myklebust
2012-03-05 23:20         ` [PATCH v3 06/16] NFSv4: Add a helper for encoding stateids Trond Myklebust
2012-03-05 23:20           ` [PATCH v3 07/16] NFSv4: Rename nfs4_copy_stateid() Trond Myklebust
2012-03-05 23:20             ` [PATCH v3 08/16] NFSv4: Add helpers for basic copying of stateids Trond Myklebust
2012-03-05 23:20               ` [PATCH v3 09/16] NFSv4: Simplify the struct nfs4_stateid Trond Myklebust
2012-03-05 23:20                 ` [PATCH v3 10/16] NFSv4: Minor clean ups for encode_string() Trond Myklebust
2012-03-05 23:20                   ` [PATCH v3 11/16] NFSv4: Add a helper for encoding NFSv4 sequence ids Trond Myklebust
2012-03-05 23:20                     ` [PATCH v3 12/16] NFSv4: Add a encode op helper Trond Myklebust
2012-03-05 23:20                       ` [PATCH v3 13/16] NFS: Fix nfs4_verifier memory alignment Trond Myklebust
2012-03-05 23:20                         ` [PATCH v3 14/16] NFSv4: Cleanup - convert more functions to use encode_op_hdr Trond Myklebust
2012-03-05 23:20                           ` [PATCH v3 15/16] NFSv4: More xdr cleanups Trond Myklebust
2012-03-05 23:20                             ` [PATCH v3 16/16] NFSv4: Add a helper encode_uint64 Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).