From patchwork Tue Feb 28 19:45:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomohiro Kusumi X-Patchwork-Id: 9596707 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 30B7D600CB for ; Tue, 28 Feb 2017 20:30:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2482A28571 for ; Tue, 28 Feb 2017 20:30:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1917628579; Tue, 28 Feb 2017 20:30:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D128D28571 for ; Tue, 28 Feb 2017 20:30:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751808AbdB1UaC (ORCPT ); Tue, 28 Feb 2017 15:30:02 -0500 Received: from mx2.mpynet.fi ([82.197.21.85]:59713 "EHLO mx2.mpynet.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751461AbdB1U3n (ORCPT ); Tue, 28 Feb 2017 15:29:43 -0500 X-Greylist: delayed 2612 seconds by postgrey-1.27 at vger.kernel.org; Tue, 28 Feb 2017 15:29:42 EST From: Tomohiro Kusumi To: , , , , CC: Tomohiro Kusumi Subject: [PATCH 2/3] nfs: use SEEK_CUR/SET Date: Tue, 28 Feb 2017 21:45:22 +0200 Message-ID: <20170228194523.2054-2-tkusumi@tuxera.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170228194523.2054-1-tkusumi@tuxera.com> References: <20170228194523.2054-1-tkusumi@tuxera.com> MIME-Version: 1.0 X-ClientProxiedBy: tuxera-exch.ad.tuxera.com (10.20.48.11) To tuxera-exch.ad.tuxera.com (10.20.48.11) Received-SPF: none Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Tomohiro Kusumi --- fs/nfs/dir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index fad8104..95712e1 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -972,9 +972,9 @@ static loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int whence) filp, offset, whence); switch (whence) { - case 1: + case SEEK_CUR: offset += filp->f_pos; - case 0: + case SEEK_SET: if (offset >= 0) break; default: