From patchwork Fri Jan 24 03:50:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: malahal naineni X-Patchwork-Id: 3532821 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 612F8C02DC for ; Fri, 24 Jan 2014 03:51:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C4C6520154 for ; Fri, 24 Jan 2014 03:51:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B138320131 for ; Fri, 24 Jan 2014 03:51:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751349AbaAXDu7 (ORCPT ); Thu, 23 Jan 2014 22:50:59 -0500 Received: from e39.co.us.ibm.com ([32.97.110.160]:58430 "EHLO e39.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750769AbaAXDu6 (ORCPT ); Thu, 23 Jan 2014 22:50:58 -0500 Received: from /spool/local by e39.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 23 Jan 2014 20:50:58 -0700 Received: from d01dlp03.pok.ibm.com (9.56.250.168) by e39.co.us.ibm.com (192.168.1.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 23 Jan 2014 20:50:55 -0700 Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 72E63C90026 for ; Thu, 23 Jan 2014 22:50:52 -0500 (EST) Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by b01cxnp22036.gho.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s0O3osnp6422790 for ; Fri, 24 Jan 2014 03:50:54 GMT Received: from d01av01.pok.ibm.com (localhost [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s0O3osXK021277 for ; Thu, 23 Jan 2014 22:50:54 -0500 Received: from malahal (malahal.austin.ibm.com [9.41.105.170]) by d01av01.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s0O3os2I021266 for ; Thu, 23 Jan 2014 22:50:54 -0500 Received: by malahal (Postfix, from userid 155450) id A991ABFE97; Thu, 23 Jan 2014 21:50:53 -0600 (CST) From: Malahal Naineni To: linux-nfs@vger.kernel.org Subject: [PATCH] nfs: handle servers that support either ALLOW or DENY ACE types. Date: Thu, 23 Jan 2014 21:50:53 -0600 Message-Id: <1390535453-15585-1-git-send-email-malahal@us.ibm.com> X-Mailer: git-send-email 1.7.0.4 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14012403-9332-0000-0000-000002DE5197 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.5 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 Currently we support ACLs if the NFS server file system supports ALLOW and DENY ACE types. This patch makes the Linux client work with ACLs if the server supports either ALLOW or DENY ACE types. Signed-off-by: Malahal Naineni --- fs/nfs/nfs4proc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 15052b8..4504685 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -4321,9 +4321,9 @@ static int nfs4_proc_renew(struct nfs_client *clp, struct rpc_cred *cred) static inline int nfs4_server_supports_acls(struct nfs_server *server) { - return (server->caps & NFS_CAP_ACLS) - && (server->acl_bitmask & ACL4_SUPPORT_ALLOW_ACL) - && (server->acl_bitmask & ACL4_SUPPORT_DENY_ACL); + return server->caps & NFS_CAP_ACLS && + (server->acl_bitmask & ACL4_SUPPORT_ALLOW_ACL || + server->acl_bitmask & ACL4_SUPPORT_DENY_ACL); } /* Assuming that XATTR_SIZE_MAX is a multiple of PAGE_SIZE, and that