aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/mempool.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/mempool.c b/mm/mempool.c
index 920c8c3ab1b8..9a72f7d918fa 100644
--- a/mm/mempool.c
+++ b/mm/mempool.c
@@ -204,7 +204,7 @@ void * mempool_alloc(mempool_t *pool, unsigned int __nocast gfp_mask)
204{ 204{
205 void *element; 205 void *element;
206 unsigned long flags; 206 unsigned long flags;
207 DEFINE_WAIT(wait); 207 wait_queue_t wait;
208 int gfp_temp; 208 int gfp_temp;
209 209
210 might_sleep_if(gfp_mask & __GFP_WAIT); 210 might_sleep_if(gfp_mask & __GFP_WAIT);
@@ -235,6 +235,7 @@ repeat_alloc:
235 235
236 /* Now start performing page reclaim */ 236 /* Now start performing page reclaim */
237 gfp_temp = gfp_mask; 237 gfp_temp = gfp_mask;
238 init_wait(&wait);
238 prepare_to_wait(&pool->wait, &wait, TASK_UNINTERRUPTIBLE); 239 prepare_to_wait(&pool->wait, &wait, TASK_UNINTERRUPTIBLE);
239 smp_mb(); 240 smp_mb();
240 if (!pool->curr_nr) 241 if (!pool->curr_nr)