Author: trasz Date: Sun Apr 19 09:56:30 2009 New Revision: 191266 URL: http://svn.freebsd.org/changeset/base/191266
Log: When allocating 'struct acl' instances, use malloc(9) instead of uma(9). This struct will get much bigger soon, and we don't want to waste too much memory on UMA caches. Reviewed by: rwatson Modified: head/sys/kern/vfs_acl.c Modified: head/sys/kern/vfs_acl.c ============================================================================== --- head/sys/kern/vfs_acl.c Sun Apr 19 08:31:55 2009 (r191265) +++ head/sys/kern/vfs_acl.c Sun Apr 19 09:56:30 2009 (r191266) @@ -56,9 +56,8 @@ __FBSDID("$FreeBSD$"); #include <security/mac/mac_framework.h> -#include <vm/uma.h> +static MALLOC_DEFINE(M_ACL, "acl", "Access Control Lists"); -uma_zone_t acl_zone; static int vacl_set_acl(struct thread *td, struct vnode *vp, acl_type_t type, struct acl *aclp); static int vacl_get_acl(struct thread *td, struct vnode *vp, @@ -430,7 +429,7 @@ acl_alloc(int flags) { struct acl *aclp; - aclp = uma_zalloc(acl_zone, flags); + aclp = malloc(sizeof(*aclp), M_ACL, flags); return (aclp); } @@ -439,16 +438,5 @@ void acl_free(struct acl *aclp) { - uma_zfree(acl_zone, aclp); + free(aclp, M_ACL); } - -/* ARGUSED */ - -static void -aclinit(void *dummy __unused) -{ - - acl_zone = uma_zcreate("ACL UMA zone", sizeof(struct acl), - NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); -} -SYSINIT(acls, SI_SUB_ACL, SI_ORDER_FIRST, aclinit, NULL); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"