]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.drivers/block-abort-request-rq-complete-marking
Updated xen patches taken from suse.
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.drivers / block-abort-request-rq-complete-marking
1 From: Jens Axboe <jens.axboe@oracle.com>
2 Date: Tue Sep 16 09:54:11 2008 -0700
3 Subject: use rq complete marking in blk_abort_request()
4 Git: 7ba1fbaa4a478f72fbaf5a56af9c82a77966b4c7
5 References: bnc#434105
6
7 We cannot abort a request if we raced with the timeout handler already,
8 or with the IO completion. So make blk_abort_request() mark the request
9 as complete, and only continue if we succeeded.
10
11 Found and suggested by Mike Anderson <andmike@linux.vnet.ibm.com>
12
13 Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 Signed-off-by: Hannes Reinecke <hare@suse.de>
15
16 ---
17 block/blk-timeout.c | 2 ++
18 1 file changed, 2 insertions(+)
19
20 --- a/block/blk-timeout.c
21 +++ b/block/blk-timeout.c
22 @@ -99,6 +99,8 @@ void blk_rq_timed_out_timer(unsigned lon
23 */
24 void blk_abort_request(struct request *req)
25 {
26 + if (blk_mark_rq_complete(req))
27 + return;
28 blk_delete_timer(req);
29 blk_rq_timed_out(req);
30 }