diff options
author | Jeff Roberson <jeff@FreeBSD.org> | 2003-01-20 01:32:56 +0000 |
---|---|---|
committer | Jeff Roberson <jeff@FreeBSD.org> | 2003-01-20 01:32:56 +0000 |
commit | ebc85edf5e1fc01f3abc59d89b6038a09b428533 (patch) | |
tree | ad96a0dfdac649e679d3ad29947e7f43094d6dd7 /sys/vm/uma_core.c | |
parent | 4a532ff091d6334833b8983319e169760fa1f5e3 (diff) | |
download | src-ebc85edf5e1fc01f3abc59d89b6038a09b428533.tar.gz src-ebc85edf5e1fc01f3abc59d89b6038a09b428533.zip |
- M_WAITOK is 0 and not a real flag. Test for this properly.
Submitted by: tmm
Pointy hat to: jeff
Notes
Notes:
svn path=/head/; revision=109548
Diffstat (limited to 'sys/vm/uma_core.c')
-rw-r--r-- | sys/vm/uma_core.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 76e345a63833..044112de1768 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -1476,10 +1476,10 @@ uma_zone_slab(uma_zone_t zone, int flags) zone->uz_pages >= zone->uz_maxpages) { zone->uz_flags |= UMA_ZFLAG_FULL; - if (flags & M_WAITOK) - msleep(zone, &zone->uz_lock, PVM, "zonelimit", 0); - else + if (flags & M_NOWAIT) break; + else + msleep(zone, &zone->uz_lock, PVM, "zonelimit", 0); continue; } zone->uz_recurse++; @@ -1499,7 +1499,7 @@ uma_zone_slab(uma_zone_t zone, int flags) * could have while we were unlocked. Check again before we * fail. */ - if ((flags & M_WAITOK) == 0) + if (flags & M_NOWAIT) flags |= M_NOVM; } return (slab); @@ -1587,7 +1587,6 @@ uma_zalloc_bucket(uma_zone_t zone, int flags) } /* Don't block on the next fill */ flags |= M_NOWAIT; - flags &= ~M_WAITOK; } zone->uz_fills--; |