Skip to content

Commit d16a676

Browse files
committed
ide: don't clear special on ide_queue_rq() entry
We can't use RQF_DONTPREP to see if we should clear ->special, as someone could have set that while inserting the request. Make sure we clear it in our ->initialize_rq_fn() helper instead. Fixes: 22ce0a7 ("ide: don't use req->special") Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 628bd85 commit d16a676

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

‎drivers/ide/ide-io.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -463,11 +463,6 @@ 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 (!(rq->rq_flags & RQF_DONTPREP)) {
467-
rq->rq_flags |= RQF_DONTPREP;
468-
ide_req(rq)->special = NULL;
469-
}
470-
471466
/* HLD do_request() callback might sleep, make sure it's okay */
472467
might_sleep();
473468

‎drivers/ide/ide-probe.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,7 @@ static void ide_initialize_rq(struct request *rq)
746746
{
747747
struct ide_request *req = blk_mq_rq_to_pdu(rq);
748748

749+
req->special = NULL;
749750
scsi_req_init(&req->sreq);
750751
req->sreq.sense = req->sense;
751752
}

0 commit comments

Comments
 (0)