Skip to content

Commit

Permalink
block: set up rq->rq_disk properly for flush requests
Browse files Browse the repository at this point in the history
q->bar_rq.rq_disk is NULL. Use the rq_disk of the original request
instead.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
  • Loading branch information
FUJITA Tomonori authored and Jens Axboe committed Aug 7, 2010
1 parent 28e18d0 commit 16f2319
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/blk-barrier.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 16f2319

Please sign in to comment.