Skip to content

Commit 9334ae5

Browse files
committed
ide: clear ide_req()->special for non-passthrough requests
The initial patch cleared this for all requests, which is wrong since internal uses can't have this cleared as that's what they are using to pass data. The fix moved the initialization to the mq_ops->initialize_rq_fn(), but that's only a partial fix since it only catches uses from blk_get_request(), not requests coming from the file system. Keep the non-fs initialization, and add the IDE entry clear IFF RQF_DONTPREP isn't set and it's a passthrough request. Fixes: d16a676 ("ide: don't clear special on ide_queue_rq() entry") Fixes: 22ce0a7 ("ide: don't use req->special") Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent db29eb0 commit 9334ae5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎drivers/ide/ide-io.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,11 @@ blk_status_t ide_queue_rq(struct blk_mq_hw_ctx *hctx,
463463
struct request *rq = bd->rq;
464464
ide_startstop_t startstop;
465465

466+
if (!blk_rq_is_passthrough(rq) && !(rq->rq_flags & RQF_DONTPREP)) {
467+
rq->rq_flags |= RQF_DONTPREP;
468+
ide_req(rq)->special = NULL;
469+
}
470+
466471
/* HLD do_request() callback might sleep, make sure it's okay */
467472
might_sleep();
468473

0 commit comments

Comments
 (0)