Commit 36aed1f9 authored by Andrew Morton's avatar Andrew Morton Committed by Jaroslav Kysela

[PATCH] tidier atomic check in mempool_alloc()

From Hugh.

Be more explicit in the "can we sleep" test.  It doesn't change
anything unless someone is performing __GFP_IO && !__GFP_WAIT
allocations, which is nonsensical.
parent b88f83d5
......@@ -221,7 +221,7 @@ void * mempool_alloc(mempool_t *pool, int gfp_mask)
spin_unlock_irqrestore(&pool->lock, flags);
/* We must not sleep in the GFP_ATOMIC case */
if (gfp_mask == gfp_nowait)
if (!(gfp_mask & __GFP_WAIT))
return NULL;
blk_run_queues();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment