Skip to contentSkip to conversation

nfs: Fix unused variable error

PATCH In review Anna Schumaker 2 participants 2 messages Jun 20, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nfs: Fix unused variable error

inode is unused when CONFIG_SUNRPC_DEBUG=n.

---
 fs/nfs/pagelist.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
fs/nfs/pagelist.c +2 -3
index 8143d6b..6e2c0bc 100644
@@ -552,7 +552,6 @@ static void nfs_pgio_prepare(struct rpc_task *task, void *calldata)
 int nfs_initiate_pgio(struct rpc_clnt *clnt, struct nfs_pgio_header *hdr,
 		      const struct rpc_call_ops *call_ops, int how, int flags)
 {
-	struct inode *inode = hdr->inode;
 	struct rpc_task *task;
 	struct rpc_message msg = {
 		.rpc_argp = &hdr->args,
@@ -575,8 +574,8 @@ int nfs_initiate_pgio(struct rpc_clnt *clnt, struct nfs_pgio_header *hdr,
 	dprintk("NFS: %5u initiated pgio call "
 		"(req %s/%llu, %u bytes @ offset %llu)\n",
 		hdr->task.tk_pid,
-		inode->i_sb->s_id,
-		(unsigned long long)NFS_FILEID(inode),
+		hdr->inode->i_sb->s_id,
+		(unsigned long long)NFS_FILEID(hdr->inode),
 		hdr->args.count,
 		(unsigned long long)hdr->args.offset);
 
Signature · 1 line
2.0.0
#1 lore raw
Quoted 2 lines · Anna Schumaker

inode is unused when CONFIG_SUNRPC_DEBUG=n.

Thanks!

Signature · 5 lines
Trond Myklebust

Linux NFS client maintainer, PrimaryData

[email protected]