From owner-svn-src-head@FreeBSD.ORG Thu Sep 9 20:07:40 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3D6710656BB; Thu, 9 Sep 2010 20:07:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C375D8FC1B; Thu, 9 Sep 2010 20:07:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o89K7ek3026697; Thu, 9 Sep 2010 20:07:40 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o89K7eLc026695; Thu, 9 Sep 2010 20:07:40 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201009092007.o89K7eLc026695@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 9 Sep 2010 20:07:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212376 - head/lib/libc/posix1e X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Sep 2010 20:07:40 -0000 Author: trasz Date: Thu Sep 9 20:07:40 2010 New Revision: 212376 URL: http://svn.freebsd.org/changeset/base/212376 Log: Add minor optimization. It's less strict than its kernel counterpart due to upcoming ACL changes required by the new ZFS. Modified: head/lib/libc/posix1e/acl_strip.c Modified: head/lib/libc/posix1e/acl_strip.c ============================================================================== --- head/lib/libc/posix1e/acl_strip.c Thu Sep 9 19:51:46 2010 (r212375) +++ head/lib/libc/posix1e/acl_strip.c Thu Sep 9 20:07:40 2010 (r212376) @@ -176,6 +176,15 @@ acl_is_trivial_np(const acl_t aclp, int case ACL_BRAND_NFS4: /* + * If the ACL has more than canonical six entries, + * it's non trivial by definition. + */ + if (aclp->ats_acl.acl_cnt > 6) { + *trivialp = 1; + return (0); + } + + /* * Calculate trivial ACL - using acl_strip_np - and compare * with the original. */