From patchwork Thu Oct 23 18:00:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schumaker, Anna" X-Patchwork-Id: 5142461 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 863BCC11AC for ; Thu, 23 Oct 2014 18:01:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D2B5B2021B for ; Thu, 23 Oct 2014 18:01:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C6381201FE for ; Thu, 23 Oct 2014 18:01:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753761AbaJWSBM (ORCPT ); Thu, 23 Oct 2014 14:01:12 -0400 Received: from mx12.netapp.com ([216.240.18.77]:8870 "EHLO mx12.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752865AbaJWSBM (ORCPT ); Thu, 23 Oct 2014 14:01:12 -0400 X-IronPort-AV: E=Sophos;i="5.04,776,1406617200"; d="scan'208";a="205460027" Received: from vmwexchts04-prd.hq.netapp.com ([10.122.105.32]) by mx12-out.netapp.com with ESMTP; 23 Oct 2014 11:00:58 -0700 Received: from smtp2.corp.netapp.com (10.57.159.114) by VMWEXCHTS04-PRD.hq.netapp.com (10.122.105.32) with Microsoft SMTP Server id 15.0.995.29; Thu, 23 Oct 2014 11:00:18 -0700 Received: from davros.com (davros.ocarinaproject.vpn.netapp.com [10.63.234.169]) by smtp2.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id s9NI0uY9024548; Thu, 23 Oct 2014 11:00:56 -0700 (PDT) From: Anna Schumaker To: , Subject: [PATCH] NFS: Use nfs_server_capable() for checknig NFS_CAP_SEEK Date: Thu, 23 Oct 2014 14:00:54 -0400 Message-ID: <1414087254-10130-1-git-send-email-Anna.Schumaker@Netapp.com> X-Mailer: git-send-email 2.1.2 MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 This should make the code easier to maintain in the future. Signed-off-by: Anna Schumaker --- fs/nfs/nfs42proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c index 0886f1d..056f5aa 100644 --- a/fs/nfs/nfs42proc.c +++ b/fs/nfs/nfs42proc.c @@ -50,7 +50,7 @@ loff_t nfs42_proc_llseek(struct file *filep, loff_t offset, int whence) struct nfs_server *server = NFS_SERVER(inode); int status; - if (!(server->caps & NFS_CAP_SEEK)) + if (!nfs_server_capable(inode, NFS_CAP_SEEK)) return -ENOTSUPP; status = nfs42_set_rw_stateid(&args.sa_stateid, filep, FMODE_READ);