svn commit: r212376 - head/lib/libc/posix1e

Edward Tomasz Napierala trasz at FreeBSD.org
Thu Sep 9 20:07:40 UTC 2010


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.
 		 */


More information about the svn-src-all mailing list