linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH v3 01/16] NFS: Fix a compile issue when !CONFIG_NFS_V4_1
Date: Mon,  5 Mar 2012 18:20:39 -0500	[thread overview]
Message-ID: <1330989654-4694-1-git-send-email-Trond.Myklebust@netapp.com> (raw)

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


             reply	other threads:[~2012-03-05 23:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-05 23:20 Trond Myklebust [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1330989654-4694-1-git-send-email-Trond.Myklebust@netapp.com \
    --to=trond.myklebust@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).