diff options
-rw-r--r-- | block/blk-core.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index b1fd4f5f07d3..a824e49c0d0a 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -268,8 +268,7 @@ void __generic_unplug_device(struct request_queue *q) | |||
268 | { | 268 | { |
269 | if (unlikely(blk_queue_stopped(q))) | 269 | if (unlikely(blk_queue_stopped(q))) |
270 | return; | 270 | return; |
271 | 271 | if (!blk_remove_plug(q) && !blk_queue_nonrot(q)) | |
272 | if (!blk_remove_plug(q)) | ||
273 | return; | 272 | return; |
274 | 273 | ||
275 | q->request_fn(q); | 274 | q->request_fn(q); |
@@ -1241,11 +1240,11 @@ get_rq: | |||
1241 | if (test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags) || | 1240 | if (test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags) || |
1242 | bio_flagged(bio, BIO_CPU_AFFINE)) | 1241 | bio_flagged(bio, BIO_CPU_AFFINE)) |
1243 | req->cpu = blk_cpu_to_group(smp_processor_id()); | 1242 | req->cpu = blk_cpu_to_group(smp_processor_id()); |
1244 | if (elv_queue_empty(q)) | 1243 | if (!blk_queue_nonrot(q) && elv_queue_empty(q)) |
1245 | blk_plug_device(q); | 1244 | blk_plug_device(q); |
1246 | add_request(q, req); | 1245 | add_request(q, req); |
1247 | out: | 1246 | out: |
1248 | if (sync) | 1247 | if (sync || blk_queue_nonrot(q)) |
1249 | __generic_unplug_device(q); | 1248 | __generic_unplug_device(q); |
1250 | spin_unlock_irq(q->queue_lock); | 1249 | spin_unlock_irq(q->queue_lock); |
1251 | return 0; | 1250 | return 0; |