Skip to content

Commit

Permalink
ide: don't clear special on ide_queue_rq() entry
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jens Axboe committed Nov 13, 2018
1 parent 628bd85 commit d16a676
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
@@ -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();

1 change: 1 addition & 0 deletions drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit d16a676

Please sign in to comment.