From patchwork Mon Apr 13 22:06:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Zviagintsev X-Patchwork-Id: 6212131 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E2E199F1C4 for ; Mon, 13 Apr 2015 22:06:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 10C2A202E9 for ; Mon, 13 Apr 2015 22:06:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 345BB202E6 for ; Mon, 13 Apr 2015 22:06:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754837AbbDMWGk (ORCPT ); Mon, 13 Apr 2015 18:06:40 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:60683 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751636AbbDMWGj (ORCPT ); Mon, 13 Apr 2015 18:06:39 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 6973520F51 for ; Mon, 13 Apr 2015 18:06:39 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Mon, 13 Apr 2015 18:06:39 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=s15v.net; h=cc :date:from:message-id:subject:to:x-sasl-enc:x-sasl-enc; s= mesmtp; bh=mt4xU3YDxsc0YAn3QwkFg/X+S+o=; b=l/r6d7zNja3QgYbNszzaB 3k6YfmmlGKwefgInei74nW1OtWb95WhRvB+VnWGv6RH0THmLK6vhC33YXduxd46e 1FX2NA81b3iLMGc6kvsPpw6f3hsrX2NOLfqE8bKrPavZodMYasbMmU4oouImEi6j lcXpANAiwkvp00W7jjB3Xs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:message-id:subject:to :x-sasl-enc:x-sasl-enc; s=smtpout; bh=mt4xU3YDxsc0YAn3QwkFg/X+S+ o=; b=WJdrVfa9XWXna+Txstnd+7hNIrTPTQDOq4oL/h+WGHGhKOAixujuTwarEi T2rYvtN3OYqNldax5a0E4O9SjxP3d/wsces8URRA738/BiMfsTiti5lBdgtD+Ise 7kQ6r17EmzzPh5SuD0qFqNf/F0oFayKUT/ij095/P0AcdDahk= X-Sasl-enc: zLbYTebAhWmNZdfNo6MS7f5jqwRqQsrolCrFsuUNnv53 1428962798 Received: from localhost (unknown [5.18.60.247]) by mail.messagingengine.com (Postfix) with ESMTPA id BE206C0001D; Mon, 13 Apr 2015 18:06:38 -0400 (EDT) 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-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED,RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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))