diff options
author | Christoph Hellwig <hch@lst.de> | 2014-09-13 16:40:12 -0700 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-09-22 12:00:07 -0600 |
commit | 46f92d42ee37e10970e33891b7b61a342bd97aeb (patch) | |
tree | f8e8a59f0daa0c0fa4406a34b120d1d67b9a1c22 /block/blk-timeout.c | |
parent | 81481eb423c295c5480a3fab9bb961cf286c91e7 (diff) | |
download | op-kernel-dev-46f92d42ee37e10970e33891b7b61a342bd97aeb.zip op-kernel-dev-46f92d42ee37e10970e33891b7b61a342bd97aeb.tar.gz |
blk-mq: unshared timeout handler
Duplicate the (small) timeout handler in blk-mq so that we can pass
arguments more easily to the driver timeout handler. This enables
the next patch.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-timeout.c')
-rw-r--r-- | block/blk-timeout.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/block/blk-timeout.c b/block/blk-timeout.c index 95a0959..4d44825 100644 --- a/block/blk-timeout.c +++ b/block/blk-timeout.c @@ -7,7 +7,6 @@ #include <linux/fault-inject.h> #include "blk.h" -#include "blk-mq.h" #ifdef CONFIG_FAIL_IO_TIMEOUT @@ -90,10 +89,7 @@ static void blk_rq_timed_out(struct request *req) switch (ret) { case BLK_EH_HANDLED: /* Can we use req->errors here? */ - if (q->mq_ops) - __blk_mq_complete_request(req); - else - __blk_complete_request(req); + __blk_complete_request(req); break; case BLK_EH_RESET_TIMER: blk_add_timer(req); @@ -113,7 +109,7 @@ static void blk_rq_timed_out(struct request *req) } } -void blk_rq_check_expired(struct request *rq, unsigned long *next_timeout, +static void blk_rq_check_expired(struct request *rq, unsigned long *next_timeout, unsigned int *next_set) { if (time_after_eq(jiffies, rq->deadline)) { |