summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_acl.c
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2009-04-19 09:56:30 +0000
committertrasz <trasz@FreeBSD.org>2009-04-19 09:56:30 +0000
commit128b961224f0a9fdd07bd639af908128c1855cbd (patch)
tree68dffe445900a0a13bc1ed7bcd13b169b83e12b8 /sys/kern/vfs_acl.c
parentdd2833d0d662792c4273ce6ef871c2e67e3e84f2 (diff)
downloadFreeBSD-src-128b961224f0a9fdd07bd639af908128c1855cbd.zip
FreeBSD-src-128b961224f0a9fdd07bd639af908128c1855cbd.tar.gz
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
Diffstat (limited to 'sys/kern/vfs_acl.c')
-rw-r--r--sys/kern/vfs_acl.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/sys/kern/vfs_acl.c b/sys/kern/vfs_acl.c
index c6ade04..e8618c8 100644
--- a/sys/kern/vfs_acl.c
+++ b/sys/kern/vfs_acl.c
@@ -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);
OpenPOWER on IntegriCloud