summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2003-01-20 01:32:56 +0000
committerjeff <jeff@FreeBSD.org>2003-01-20 01:32:56 +0000
commitb584d46930f2b04c4ed1b7af03186985983b4ac5 (patch)
treead96a0dfdac649e679d3ad29947e7f43094d6dd7 /sys/vm
parentcf409b71efe2214da293509f71f3e763de2fcde7 (diff)
downloadFreeBSD-src-b584d46930f2b04c4ed1b7af03186985983b4ac5.zip
FreeBSD-src-b584d46930f2b04c4ed1b7af03186985983b4ac5.tar.gz
- M_WAITOK is 0 and not a real flag. Test for this properly.
Submitted by: tmm Pointy hat to: jeff
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/uma_core.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
index 76e345a..044112d 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--;
OpenPOWER on IntegriCloud