author: Tejun Heo <tj@kernel.org> 2009-05-08 11:54:16 +0900
committer: Jens Axboe <jens.axboe@oracle.com> 2009-05-11 09:52:18 +0200
commit: 9934c8c04561413609d2bc38c6b9f268cba774a4
parent: 2343046826a8ca426b07601d9593ee046c298b68
Commit Summary:
Diffstat:
1 file changed, 3 insertions, 9 deletions
diff --git a/drivers/sbus/char/jsflash.c b/drivers/sbus/char/jsflash.c
index f572a4a1d141..6d4651684688 100644
--- a/drivers/sbus/char/jsflash.c
+++ b/drivers/sbus/char/jsflash.c
@@ -186,10 +186,7 @@ static void jsfd_do_request(struct request_queue *q)
{
struct request *req;
- req = elv_next_request(q);
- if (req)
- blkdev_dequeue_request(req);
-
+ req = blk_fetch_request(q);
while (req) {
struct jsfd_part *jdp = req->rq_disk->private_data;
unsigned long offset = blk_rq_pos(req) << 9;
@@ -212,11 +209,8 @@ static void jsfd_do_request(struct request_queue *q)
jsfd_read(req->buffer, jdp->dbase + offset, len);
err = 0;
end:
- if (!__blk_end_request_cur(req, err)) {
- req = elv_next_request(q);
- if (req)
- blkdev_dequeue_request(req);
- }
+ if (!__blk_end_request_cur(req, err))
+ req = blk_fetch_request(q);
}
}