Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16f2319f authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by Jens Axboe
Browse files

block: set up rq->rq_disk properly for flush requests



q->bar_rq.rq_disk is NULL. Use the rq_disk of the original request
instead.

Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent 28e18d01
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -136,7 +136,7 @@ static void queue_flush(struct request_queue *q, unsigned which)
	blk_rq_init(q, rq);
	rq->cmd_type = REQ_TYPE_FS;
	rq->cmd_flags = REQ_HARDBARRIER | REQ_FLUSH;
	rq->rq_disk = q->bar_rq.rq_disk;
	rq->rq_disk = q->orig_bar_rq->rq_disk;
	rq->end_io = end_io;

	elv_insert(q, rq, ELEVATOR_INSERT_FRONT);