aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/block/cfq-iosched.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/block/cfq-iosched.c b/drivers/block/cfq-iosched.c
index 0ef7a0065ece..2210bacad56a 100644
--- a/drivers/block/cfq-iosched.c
+++ b/drivers/block/cfq-iosched.c
@@ -1202,13 +1202,16 @@ retry:
1202 if (new_cfqq) { 1202 if (new_cfqq) {
1203 cfqq = new_cfqq; 1203 cfqq = new_cfqq;
1204 new_cfqq = NULL; 1204 new_cfqq = NULL;
1205 } else if (gfp_mask & __GFP_WAIT) { 1205 } else {
1206 spin_unlock_irq(cfqd->queue->queue_lock); 1206 spin_unlock_irq(cfqd->queue->queue_lock);
1207 new_cfqq = kmem_cache_alloc(cfq_pool, gfp_mask); 1207 new_cfqq = kmem_cache_alloc(cfq_pool, gfp_mask);
1208 spin_lock_irq(cfqd->queue->queue_lock); 1208 spin_lock_irq(cfqd->queue->queue_lock);
1209
1210 if (!new_cfqq && !(gfp_mask & __GFP_WAIT))
1211 goto out;
1212
1209 goto retry; 1213 goto retry;
1210 } else 1214 }
1211 goto out;
1212 1215
1213 memset(cfqq, 0, sizeof(*cfqq)); 1216 memset(cfqq, 0, sizeof(*cfqq));
1214 1217