From patchwork Wed May 29 20:05:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trond Myklebust X-Patchwork-Id: 2632521 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id E81A8DF24C for ; Wed, 29 May 2013 20:05:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935129Ab3E2UF3 (ORCPT ); Wed, 29 May 2013 16:05:29 -0400 Received: from mx12.netapp.com ([216.240.18.77]:4891 "EHLO mx12.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933570Ab3E2UF2 (ORCPT ); Wed, 29 May 2013 16:05:28 -0400 X-IronPort-AV: E=Sophos;i="4.87,766,1363158000"; d="scan'208";a="59313508" Received: from smtp2.corp.netapp.com ([10.57.159.114]) by mx12-out.netapp.com with ESMTP; 29 May 2013 13:05:28 -0700 Received: from leira.trondhjem.org.com (leira.trondhjem.org.vpn.netapp.com [10.63.238.119]) by smtp2.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id r4TK5RxP009428; Wed, 29 May 2013 13:05:27 -0700 (PDT) From: Trond Myklebust To: linux-nfs@vger.kernel.org Subject: [PATCH 1/5] NFSv4: Remove redundant check for FMODE_EXEC in nfs_finish_open Date: Wed, 29 May 2013 16:05:21 -0400 Message-Id: <1369857925-42068-1-git-send-email-Trond.Myklebust@netapp.com> X-Mailer: git-send-email 1.8.1.4 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org We already check the EXEC access mode in the lower layers. Signed-off-by: Trond Myklebust --- fs/nfs/dir.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index e093e73..bf4e5f4 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1362,13 +1362,6 @@ static int nfs_finish_open(struct nfs_open_context *ctx, ctx->dentry = dget(dentry); } - /* If the open_intent is for execute, we have an extra check to make */ - if (ctx->mode & FMODE_EXEC) { - err = nfs_may_open(dentry->d_inode, ctx->cred, open_flags); - if (err < 0) - goto out; - } - err = finish_open(file, dentry, do_open, opened); if (err) goto out;