summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2003-07-28 02:29:07 +0000
committeralc <alc@FreeBSD.org>2003-07-28 02:29:07 +0000
commit79bbf9b70237e33220855aa14dc66e06eb75ee37 (patch)
tree7797beb82ca31f0a7ccd9b10c3c3d8cdf0925630 /sys
parent9224d2172714766e4a8841eeeba7d18f9b34210d (diff)
downloadFreeBSD-src-79bbf9b70237e33220855aa14dc66e06eb75ee37.zip
FreeBSD-src-79bbf9b70237e33220855aa14dc66e06eb75ee37.tar.gz
None of the "alloc" functions used by UMA assume that Giant is held any
longer. (If they still need it, e.g., contigmalloc(), they acquire it themselves.) Therefore, we need not acquire Giant in slab_zalloc().
Diffstat (limited to 'sys')
-rw-r--r--sys/vm/uma_core.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
index c2c11f8..63cd26a 100644
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -706,15 +706,8 @@ slab_zalloc(uma_zone_t zone, int wait)
wait &= ~M_ZERO;
if (booted || (zone->uz_flags & UMA_ZFLAG_PRIVALLOC)) {
- if ((wait & M_NOWAIT) == 0) {
- mtx_lock(&Giant);
- mem = zone->uz_allocf(zone,
- zone->uz_ppera * UMA_SLAB_SIZE, &flags, wait);
- mtx_unlock(&Giant);
- } else {
- mem = zone->uz_allocf(zone,
- zone->uz_ppera * UMA_SLAB_SIZE, &flags, wait);
- }
+ mem = zone->uz_allocf(zone, zone->uz_ppera * UMA_SLAB_SIZE,
+ &flags, wait);
if (mem == NULL) {
ZONE_LOCK(zone);
return (NULL);
OpenPOWER on IntegriCloud