]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - block/elevator.c
block: unify request timeout handling
[linux-2.6-omap-h63xx.git] / block / elevator.c
index 8e3fc3afc77b31e0abef2c42b5c1fe315f789968..a91fc59edd017f7ac3cdbe8626f0b95c56dd7c2d 100644 (file)
@@ -36,6 +36,8 @@
 #include <linux/hash.h>
 #include <linux/uaccess.h>
 
+#include "blk.h"
+
 static DEFINE_SPINLOCK(elv_list_lock);
 static LIST_HEAD(elv_list);
 
@@ -771,6 +773,12 @@ struct request *elv_next_request(struct request_queue *q)
                         */
                        rq->cmd_flags |= REQ_STARTED;
                        blk_add_trace_rq(q, rq, BLK_TA_ISSUE);
+
+                       /*
+                        * We are now handing the request to the hardware,
+                        * add the timeout handler
+                        */
+                       blk_add_timer(rq);
                }
 
                if (!q->boundary_rq || q->boundary_rq == rq) {