ide: don't clear special on ide_queue_rq() entry
authorJens Axboe <axboe@kernel.dk>
Tue, 13 Nov 2018 00:19:32 +0000 (17:19 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 13 Nov 2018 00:19:32 +0000 (17:19 -0700)
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: 22ce0a7ccf23 ("ide: don't use req->special")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/ide/ide-io.c
drivers/ide/ide-probe.c

index 94e9c79c41cfde5e4a53f47ac50981ffaab9f4b8..c0dd0fad16a3d0b4033f4597a18289b6a4fa11a4 100644 (file)
@@ -463,11 +463,6 @@ blk_status_t ide_queue_rq(struct blk_mq_hw_ctx *hctx,
        struct request  *rq = bd->rq;
        ide_startstop_t startstop;
 
-       if (!(rq->rq_flags & RQF_DONTPREP)) {
-               rq->rq_flags |= RQF_DONTPREP;
-               ide_req(rq)->special = NULL;
-       }
-
        /* HLD do_request() callback might sleep, make sure it's okay */
        might_sleep();
 
index 40384838e43993759ee6071c99f77d9eb46b70f5..63627be0811a740142c769bcc66da80f64cc101e 100644 (file)
@@ -746,6 +746,7 @@ static void ide_initialize_rq(struct request *rq)
 {
        struct ide_request *req = blk_mq_rq_to_pdu(rq);
 
+       req->special = NULL;
        scsi_req_init(&req->sreq);
        req->sreq.sense = req->sense;
 }