Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+4 -1
+4 -1
drivers/block/null_blk.c
··· 227 227 228 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 236 static inline void null_handle_cmd(struct nullb_cmd *cmd)