From patchwork Sun Apr 10 16:29:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Fields X-Patchwork-Id: 696721 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3AGTf99006510 for ; Sun, 10 Apr 2011 16:29:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755037Ab1DJQ3k (ORCPT ); Sun, 10 Apr 2011 12:29:40 -0400 Received: from fieldses.org ([174.143.236.118]:57451 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754904Ab1DJQ3j (ORCPT ); Sun, 10 Apr 2011 12:29:39 -0400 Received: from bfields by fieldses.org with local (Exim 4.72) (envelope-from ) id 1Q8xW6-00076d-2J; Sun, 10 Apr 2011 12:29:38 -0400 From: "J. Bruce Fields" To: "linux-nfs@vger.kernel.org" Cc: Bryan Schumaker , "J. Bruce Fields" Subject: [PATCH 3/5] nfsd4: introduce OPDESC helper Date: Sun, 10 Apr 2011 12:29:31 -0400 Message-Id: <1302452973-27272-3-git-send-email-bfields@redhat.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <20110410162536.GC26233@fieldses.org> References: <20110410162536.GC26233@fieldses.org> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sun, 10 Apr 2011 16:29:41 +0000 (UTC) Signed-off-by: J. Bruce Fields --- fs/nfsd/nfs4proc.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 5fcb139..126b8f7 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -1031,6 +1031,11 @@ static __be32 nfs41_check_op_ordering(struct nfsd4_compoundargs *args) return nfs_ok; } +static inline struct nfsd4_operation *OPDESC(struct nfsd4_op *op) +{ + return &nfsd4_ops[op->opnum]; +} + /* * COMPOUND call. */ @@ -1108,7 +1113,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp, goto encode_op; } - opdesc = &nfsd4_ops[op->opnum]; + opdesc = OPDESC(op); if (!cstate->current_fh.fh_dentry) { if (!(opdesc->op_flags & ALLOWED_WITHOUT_FH)) {