]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.fixes/blk-timeout-readd-timeout-list
Fix oinkmaster patch.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.fixes / blk-timeout-readd-timeout-list
CommitLineData
2cb7cef9
BS
1From: Hannes Reinecke <hare@suse.de>
2Subject: Kernel bug in kmpathd during FC cable pulls
3References: bnc#476330
4
5Kernel bug in kmpathd during FC cable pulls.
6After one FC cable pull cycle system produced call trace.
7
8As it turned out blk_abort_requests() will not touch
9any requests for which the endio processing has already
10started. So we need to splice those requests back onto
11the timeout list for endio processing to be able to
12continue properly.
13
14Signed-off-by: Hannes Reinecke <hare@suse.de>
15
16diff --git a/block/blk-timeout.c b/block/blk-timeout.c
17index 4cc0205..bcadbb2 100644
18--- a/block/blk-timeout.c
19+++ b/block/blk-timeout.c
20@@ -145,6 +145,8 @@ void blk_add_timer(struct request *req)
21 * blk_abort_queue -- Abort all request on given queue
22 * @queue: pointer to queue
23 *
24+ * We have to use list_splice() here as blk_abort_request()
25+ * might add requests back on the timeout list.
26 */
27 void blk_abort_queue(struct request_queue *q)
28 {
29@@ -161,6 +163,9 @@ void blk_abort_queue(struct request_queue *q)
30 list_for_each_entry_safe(rq, tmp, &list, timeout_list)
31 blk_abort_request(rq);
32
33+ /* Add remaining requests back on the list */
34+ list_splice(&list, &q->timeout_list);
35+
36 spin_unlock_irqrestore(q->queue_lock, flags);
37
38 }