diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2010-07-08 20:38:25 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-08-07 12:52:41 -0400 |
commit | 16f2319fd67b169c0b34391d3fa0870fff129891 (patch) | |
tree | 986105ef1ea459ad54a28cd19a1585a7e23e850f | |
parent | 28e18d0188b9e3ab82ebd09d9b1d1c7f8d1822aa (diff) |
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: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
-rw-r--r-- | block/blk-barrier.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-barrier.c b/block/blk-barrier.c index d95a1440e29d..f0faefca032f 100644 --- a/block/blk-barrier.c +++ b/block/blk-barrier.c | |||
@@ -136,7 +136,7 @@ static void queue_flush(struct request_queue *q, unsigned which) | |||
136 | blk_rq_init(q, rq); | 136 | blk_rq_init(q, rq); |
137 | rq->cmd_type = REQ_TYPE_FS; | 137 | rq->cmd_type = REQ_TYPE_FS; |
138 | rq->cmd_flags = REQ_HARDBARRIER | REQ_FLUSH; | 138 | rq->cmd_flags = REQ_HARDBARRIER | REQ_FLUSH; |
139 | rq->rq_disk = q->bar_rq.rq_disk; | 139 | rq->rq_disk = q->orig_bar_rq->rq_disk; |
140 | rq->end_io = end_io; | 140 | rq->end_io = end_io; |
141 | 141 | ||
142 | elv_insert(q, rq, ELEVATOR_INSERT_FRONT); | 142 | elv_insert(q, rq, ELEVATOR_INSERT_FRONT); |