aboutsummaryrefslogtreecommitdiff
path: root/drivers/block/paride/pd.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-05-08 11:54:06 +0900
committerJens Axboe <jens.axboe@oracle.com>2009-05-11 09:52:16 +0200
commitb12d4f82c1a3cdcb2441c803a3368a9426f2f47f (patch)
tree043c804960c3192076737411c1a6854f2b49ded9 /drivers/block/paride/pd.c
parent2d75ce084eec2a8154225c7e978191b364029003 (diff)
paride: dequeue in-flight request
pd/pf/pcd have track in-flight request by pd/pf/pcd_req. They can be converted to dequeueing model by updating fetching and completion paths. Convert them. Note that removal of elv_next_request() call from pf_next_buf() doesn't make any functional difference. The path is traveled only during partial completion of a request and elv_next_request() call must return the same request anyway. [ Impact: dequeue in-flight request ] Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Tim Waugh <tim@cyberelk.net> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block/paride/pd.c')
-rw-r--r--drivers/block/paride/pd.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c
index 9ec5d4ac0b6..d2ca3f55206 100644
--- a/drivers/block/paride/pd.c
+++ b/drivers/block/paride/pd.c
@@ -410,11 +410,14 @@ static void run_fsm(void)
pd_claimed = 0;
phase = NULL;
spin_lock_irqsave(&pd_lock, saved_flags);
- __blk_end_request_cur(pd_req,
- res == Ok ? 0 : -EIO);
- pd_req = elv_next_request(pd_queue);
- if (!pd_req)
- stop = 1;
+ if (!__blk_end_request_cur(pd_req,
+ res == Ok ? 0 : -EIO)) {
+ pd_req = elv_next_request(pd_queue);
+ if (!pd_req)
+ stop = 1;
+ else
+ blkdev_dequeue_request(pd_req);
+ }
spin_unlock_irqrestore(&pd_lock, saved_flags);
if (stop)
return;
@@ -706,6 +709,7 @@ static void do_pd_request(struct request_queue * q)
pd_req = elv_next_request(q);
if (!pd_req)
return;
+ blkdev_dequeue_request(pd_req);
schedule_fsm();
}