lkml.org 
[lkml]   [2015]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] nfs: Fix unused variable build warning when CONFIG_SUNRPC_DEBUG is not set
Date
Commit f52cbe4c9838 ("nfs: generic_write_checks() shouldn't be done on
swapout...") caused unused variable build warning in fs/nfs/file.c
when CONFIG_SUNRPC_DEBUG is not set as pos variable is used only in
dprintk() call. Fix it.

Signed-off-by: Sergei Zviagintsev <sergei@s15v.net>
Fixes: f52cbe4c9838 ("nfs: generic_write_checks() shouldn't be done on swapout...")
---
fs/nfs/file.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 031ddcb1061d..c40e4363e746 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -674,7 +674,6 @@ ssize_t nfs_file_write(struct kiocb *iocb, struct iov_iter *from)
unsigned long written = 0;
ssize_t result;
size_t count = iov_iter_count(from);
- loff_t pos = iocb->ki_pos;

result = nfs_key_timeout_notify(file, inode);
if (result)
@@ -688,7 +687,7 @@ ssize_t nfs_file_write(struct kiocb *iocb, struct iov_iter *from)
}

dprintk("NFS: write(%pD2, %zu@%Ld)\n",
- file, count, (long long) pos);
+ file, count, (long long) iocb->ki_pos);

result = -EBUSY;
if (IS_SWAPFILE(inode))
--
1.8.3.1


\
 
 \ /
  Last update: 2015-04-14 00:41    [W:0.046 / U:2.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site