aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/blk-core.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index b754a4a2f9bd..1b7dddf94f4f 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -253,9 +253,11 @@ EXPORT_SYMBOL(__generic_unplug_device);
253 **/ 253 **/
254void generic_unplug_device(struct request_queue *q) 254void generic_unplug_device(struct request_queue *q)
255{ 255{
256 spin_lock_irq(q->queue_lock); 256 if (blk_queue_plugged(q)) {
257 __generic_unplug_device(q); 257 spin_lock_irq(q->queue_lock);
258 spin_unlock_irq(q->queue_lock); 258 __generic_unplug_device(q);
259 spin_unlock_irq(q->queue_lock);
260 }
259} 261}
260EXPORT_SYMBOL(generic_unplug_device); 262EXPORT_SYMBOL(generic_unplug_device);
261 263