diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-01-09 02:20:11 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-01-09 02:20:11 (GMT) |
commit | 6108209c4ae964836f6bac5210f1c64153800b62 (patch) | |
tree | 83651902b46af6bbf8d2ea4841b397bac306095b /drivers/block/null_blk.c | |
parent | a1c6f05733c27ba7067c06c095f49e8732a5ae17 (diff) | |
parent | a7f61e89af73e9bf760826b20dba4e637221fcb9 (diff) | |
download | linux-6108209c4ae964836f6bac5210f1c64153800b62.tar.xz |
Merge branch 'for-linus' into work.misc
Diffstat (limited to 'drivers/block/null_blk.c')
-rw-r--r-- | drivers/block/null_blk.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index a428e4e..09e3c0d 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c @@ -232,20 +232,19 @@ static void end_cmd(struct nullb_cmd *cmd) break; case NULL_Q_BIO: bio_endio(cmd->bio); - goto free_cmd; + break; } + free_cmd(cmd); + /* Restart queue if needed, as we are freeing a tag */ - if (q && !q->mq_ops && blk_queue_stopped(q)) { + if (queue_mode == NULL_Q_RQ && blk_queue_stopped(q)) { unsigned long flags; spin_lock_irqsave(q->queue_lock, flags); - if (blk_queue_stopped(q)) - blk_start_queue(q); + blk_start_queue_async(q); spin_unlock_irqrestore(q->queue_lock, flags); } -free_cmd: - free_cmd(cmd); } static enum hrtimer_restart null_cmd_timer_expired(struct hrtimer *timer) |