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.
                 */
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to