diff options
author | Kiyoshi Ueda <k-ueda@ct.jp.nec.com> | 2009-06-02 02:44:01 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-06-02 02:44:01 -0400 |
commit | 53c663ce0f39ba8e8ef652e400b317bc60ac7f19 (patch) | |
tree | 5d72723bbc35e4b35734fe770b5022192c4f92c9 /block/elevator.c | |
parent | c143dc903d7c0b15f5052e00b2c7de33a8b4299c (diff) |
block: fix a possible oops on elv_abort_queue()
I found one more mis-conversion to the 'request is always dequeued
when completing' model in elv_abort_queue() during code inspection.
Although I haven't hit any problem caused by this mis-conversion yet
and just done compile/boot test, please apply if you have no problem.
Request must be dequeued when it completes.
However, elv_abort_queue() completes requests without dequeueing.
This will cause oops in the __blk_end_request_all().
This patch fixes the oops.
Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/elevator.c')
-rw-r--r-- | block/elevator.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/block/elevator.c b/block/elevator.c index bd78f693fcf2..a029cfed80da 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
@@ -813,6 +813,11 @@ void elv_abort_queue(struct request_queue *q) | |||
813 | rq = list_entry_rq(q->queue_head.next); | 813 | rq = list_entry_rq(q->queue_head.next); |
814 | rq->cmd_flags |= REQ_QUIET; | 814 | rq->cmd_flags |= REQ_QUIET; |
815 | trace_block_rq_abort(q, rq); | 815 | trace_block_rq_abort(q, rq); |
816 | /* | ||
817 | * Mark this request as started so we don't trigger | ||
818 | * any debug logic in the end I/O path. | ||
819 | */ | ||
820 | blk_start_request(rq); | ||
816 | __blk_end_request_all(rq, -EIO); | 821 | __blk_end_request_all(rq, -EIO); |
817 | } | 822 | } |
818 | } | 823 | } |