Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754902AbbDMWGn (ORCPT ); Mon, 13 Apr 2015 18:06:43 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:54580 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751770AbbDMWGj (ORCPT ); Mon, 13 Apr 2015 18:06:39 -0400 X-Sasl-enc: zLbYTebAhWmNZdfNo6MS7f5jqwRqQsrolCrFsuUNnv53 1428962798 From: Sergei Zviagintsev To: Trond Myklebust , Anna Schumaker Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, Sergei Zviagintsev Subject: [PATCH] nfs: Fix unused variable build warning when CONFIG_SUNRPC_DEBUG is not set Date: Tue, 14 Apr 2015 01:06:19 +0300 Message-Id: <1428962779-3741-1-git-send-email-sergei@s15v.net> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1346 Lines: 40 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 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/