linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rakib Mullick <rakib.mullick@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: linux-nfs@vger.kernel.org,
	Trond Myklebust <Trond.Myklebust@netapp.com>,
	akpm@linux-foundation.org
Subject: [PATCH] nfs: Fix unused variable warning.
Date: Fri, 28 Oct 2011 16:36:32 +0600	[thread overview]
Message-ID: <1319798192.26450.1.camel@localhost.localdomain> (raw)

 When CONFIG_NFS=y, but CONFIG_NFS_V3_{,V4}=n we get the following warning:

	fs/nfs/write.c: In function ‘nfs_writeback_done’:
	fs/nfs/write.c:1246:21: warning: unused variable ‘server’

 This patch fixes it.

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
---

diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 2219c88..e528e5c 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -1243,7 +1243,6 @@ void nfs_writeback_done(struct rpc_task *task, struct nfs_write_data *data)
 {
 	struct nfs_writeargs	*argp = &data->args;
 	struct nfs_writeres	*resp = &data->res;
-	struct nfs_server	*server = NFS_SERVER(data->inode);
 	int status;
 
 	dprintk("NFS: %5u nfs_writeback_done (status %d)\n",
@@ -1272,6 +1271,8 @@ void nfs_writeback_done(struct rpc_task *task, struct nfs_write_data *data)
 		 *	 as a dprintk() in order to avoid filling syslog.
 		 */
 		static unsigned long    complain;
+		struct nfs_server	*server;
+		server = NFS_SERVER(data->inode);
 
 		/* Note this will print the MDS for a DS write */
 		if (time_before(complain, jiffies)) {



             reply	other threads:[~2011-10-28 10:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-28 10:36 Rakib Mullick [this message]
2011-10-31 15:18 ` [PATCH] nfs: Fix unused variable warning Trond Myklebust
2011-10-31 17:12   ` Rakib Mullick
2011-10-31 17:43     ` Trond Myklebust
2011-10-31 18:16       ` Rakib Mullick
2011-10-31 18:28         ` 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=1319798192.26450.1.camel@localhost.localdomain \
    --to=rakib.mullick@gmail.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --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).