Date: Tue, 28 Apr 2009 15:31:58 GMT From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 161254 for review Message-ID: <200904281531.n3SFVwin039208@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=161254 Change 161254 by trasz@trasz_victim on 2009/04/28 15:31:57 Remove acl_size_for_cnt(). Affected files ... .. //depot/projects/soc2008/trasz_nfs4acl/sys/kern/vfs_acl.c#15 edit .. //depot/projects/soc2008/trasz_nfs4acl/sys/sys/acl.h#33 edit .. //depot/projects/soc2008/trasz_nfs4acl/sys/ufs/ufs/ufs_acl.c#16 edit Differences ... ==== //depot/projects/soc2008/trasz_nfs4acl/sys/kern/vfs_acl.c#15 (text+ko) ==== @@ -571,18 +571,6 @@ return (error); } -/* - * Return the size, in bytes, required to store ACL with "cnt" entries. - */ -int -acl_size_for_cnt(int cnt) -{ - int size = sizeof(struct acl) - (ACL_MAX_ENTRIES - cnt) * - sizeof(struct acl_entry); - - return size; -} - struct acl * acl_alloc(int flags) { ==== //depot/projects/soc2008/trasz_nfs4acl/sys/sys/acl.h#33 (text+ko) ==== @@ -278,7 +278,6 @@ struct acl *dacl); struct acl *acl_alloc(int flags); void acl_free(struct acl *aclp); -int acl_size_for_cnt(int cnt); void acl_nfs4_sync_acl_from_mode(struct acl *aclp, mode_t mode, int file_owner_id); ==== //depot/projects/soc2008/trasz_nfs4acl/sys/ufs/ufs/ufs_acl.c#16 (text+ko) ==== @@ -171,7 +171,7 @@ if (error) return (error); - if (len != acl_size_for_cnt(ap->a_aclp->acl_cnt)) { + if (len != sizeof(*ap->a_aclp)) { /* * A short (or long) read, meaning that for * some reason the ACL is corrupted. Return @@ -425,7 +425,7 @@ error = vn_extattr_set(ap->a_vp, IO_NODELOCKED, NFS4_ACL_EXTATTR_NAMESPACE, NFS4_ACL_EXTATTR_NAME, - acl_size_for_cnt(ap->a_aclp->acl_cnt), + sizeof(*ap->a_aclp), (char *) ap->a_aclp, ap->a_td); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904281531.n3SFVwin039208>