uma: fix up r334824
Turns out there is code which ends up passing M_ZERO to counters. Since counters zero unconditionally on their own, just ignore drop the flag in that place.
This commit is contained in:
parent
58378a8971
commit
b8af2820f6
@ -62,7 +62,7 @@ counter_u64_alloc(int flags)
|
||||
{
|
||||
counter_u64_t r;
|
||||
|
||||
r = uma_zalloc(pcpu_zone_64, flags);
|
||||
r = uma_zalloc(pcpu_zone_64, flags & ~M_ZERO);
|
||||
if (r != NULL)
|
||||
counter_u64_zero(r);
|
||||
|
||||
|
@ -235,7 +235,7 @@ rtentry_zinit(void *mem, int size, int how)
|
||||
{
|
||||
struct rtentry *rt = mem;
|
||||
|
||||
rt->rt_pksent = counter_u64_alloc(how & ~M_ZERO);
|
||||
rt->rt_pksent = counter_u64_alloc(how);
|
||||
if (rt->rt_pksent == NULL)
|
||||
return (ENOMEM);
|
||||
|
||||
|
@ -2257,7 +2257,8 @@ uma_zalloc_arg(uma_zone_t zone, void *udata, int flags)
|
||||
KASSERT(curthread->td_critnest == 0 || SCHEDULER_STOPPED(),
|
||||
("uma_zalloc_arg: called with spinlock or critical section held"));
|
||||
if (zone->uz_flags & UMA_ZONE_PCPU)
|
||||
MPASS((flags & M_ZERO) == 0);
|
||||
KASSERT((flags & M_ZERO) == 0, ("allocating from a pcpu zone "
|
||||
"with M_ZERO passed"));
|
||||
|
||||
#ifdef DEBUG_MEMGUARD
|
||||
if (memguard_cmp_zone(zone)) {
|
||||
|
Loading…
Reference in New Issue
Block a user