diff options
author | Jens Axboe <axboe@fb.com> | 2014-06-16 13:40:25 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-06-16 13:40:25 -0400 |
commit | d891fa70876b37941a5c5bed813e73beb53ebcf7 (patch) | |
tree | 5dbbaf0e783d42042bd05fff3e2d3fa844d1ba6c | |
parent | 95ed068165d8edf6a81f9a73df0bb05c38602c3c (diff) |
null_blk: fix softirq completions for queue_mode == 1
Only blk-mq completions have payload attached to the request, for
request_fn mode we have stored it in req->special. This fixes an
oops with queue_mode=1 and softirq completions.
Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r-- | drivers/block/null_blk.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index f87c4c4c1c41..a3b042c4d448 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c | |||
@@ -227,7 +227,10 @@ static void null_cmd_end_timer(struct nullb_cmd *cmd) | |||
227 | 227 | ||
228 | static void null_softirq_done_fn(struct request *rq) | 228 | static void null_softirq_done_fn(struct request *rq) |
229 | { | 229 | { |
230 | end_cmd(blk_mq_rq_to_pdu(rq)); | 230 | if (queue_mode == NULL_Q_MQ) |
231 | end_cmd(blk_mq_rq_to_pdu(rq)); | ||
232 | else | ||
233 | end_cmd(rq->special); | ||
231 | } | 234 | } |
232 | 235 | ||
233 | static inline void null_handle_cmd(struct nullb_cmd *cmd) | 236 | static inline void null_handle_cmd(struct nullb_cmd *cmd) |