diff options
| -rw-r--r-- | block/blk-core.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index b754a4a2f9b..1b7dddf94f4 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
| @@ -253,9 +253,11 @@ EXPORT_SYMBOL(__generic_unplug_device); | |||
| 253 | **/ | 253 | **/ |
| 254 | void generic_unplug_device(struct request_queue *q) | 254 | void 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 | } |
| 260 | EXPORT_SYMBOL(generic_unplug_device); | 262 | EXPORT_SYMBOL(generic_unplug_device); |
| 261 | 263 | ||
