aboutsummaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2009-04-19 09:56:30 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2009-04-19 09:56:30 +0000
commite0ee758989e3322a50266ffb61ec89e2ecaf93a6 (patch)
tree68dffe445900a0a13bc1ed7bcd13b169b83e12b8 /sys/kern
parent019dfcf65e753e8ff3e2393f5b2e45c9c7011666 (diff)
downloadsrc-e0ee758989e3322a50266ffb61ec89e2ecaf93a6.tar.gz
src-e0ee758989e3322a50266ffb61ec89e2ecaf93a6.zip
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
Notes
Notes: svn path=/head/; revision=191266
Diffstat (limited to 'sys/kern')
-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 c6ade042ab7a..e8618c8840cc 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);