[PATCH] NFS: Fix compiler warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Bryan Schumaker <bjschuma@xxxxxxxxxx>

The "struct inode *inode" was only used in a dprintk, so it can be
removed if CONFIG_SUNRPC_DEBUG isn't enabled.

Signed-off-by: Bryan Schumaker <bjschuma@xxxxxxxxxx>
---
 fs/nfs/nfs4filelayout.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index 474c630..54c8c5a 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -85,8 +85,8 @@ filelayout_get_dserver_offset(struct pnfs_layout_segment *lseg, loff_t offset)
 static void filelayout_reset_write(struct nfs_write_data *data)
 {
 	struct nfs_pgio_header *hdr = data->header;
-	struct inode *inode = hdr->inode;
 	struct rpc_task *task = &data->task;
+	RPC_IFDEBUG(struct inode *inode = hdr->inode);
 
 	if (!test_and_set_bit(NFS_IOHDR_REDO, &hdr->flags)) {
 		dprintk("%s Reset task %5u for i/o through MDS "
@@ -109,8 +109,8 @@ static void filelayout_reset_write(struct nfs_write_data *data)
 static void filelayout_reset_read(struct nfs_read_data *data)
 {
 	struct nfs_pgio_header *hdr = data->header;
-	struct inode *inode = hdr->inode;
 	struct rpc_task *task = &data->task;
+	RPC_IFDEBUG(struct inode *inode = hdr->inode);
 
 	if (!test_and_set_bit(NFS_IOHDR_REDO, &hdr->flags)) {
 		dprintk("%s Reset task %5u for i/o through MDS "
-- 
1.7.10.2

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux