This patch converts core parts of block layer to use blk_end_request().

Signed-off-by: Kiyoshi Ueda <[EMAIL PROTECTED]>
Signed-off-by: Jun'ichi Nomura <[EMAIL PROTECTED]>
---
 block/ll_rw_blk.c |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diff -rupN 02-rq-size-macro/block/ll_rw_blk.c 
03-blkcore-caller-change/block/ll_rw_blk.c
--- 02-rq-size-macro/block/ll_rw_blk.c  2007-09-10 17:42:56.000000000 -0400
+++ 03-blkcore-caller-change/block/ll_rw_blk.c  2007-09-10 17:57:59.000000000 
-0400
@@ -365,8 +365,8 @@ void blk_ordered_complete_seq(struct req
        q->ordseq = 0;
        rq = q->orig_bar_rq;
 
-       end_that_request_first(rq, uptodate, rq->hard_nr_sectors);
-       end_that_request_last(rq, uptodate);
+       if (__blk_end_request(rq, uptodate, blk_rq_size(rq)))
+               BUG();
 }
 
 static void pre_flush_end_io(struct request *rq, int error)
@@ -484,9 +484,8 @@ int blk_do_ordered(struct request_queue 
                         * ORDERED_NONE while this request is on it.
                         */
                        blkdev_dequeue_request(rq);
-                       end_that_request_first(rq, -EOPNOTSUPP,
-                                              rq->hard_nr_sectors);
-                       end_that_request_last(rq, -EOPNOTSUPP);
+                       if (__blk_end_request(rq, -EOPNOTSUPP, blk_rq_size(rq)))
+                               BUG();
                        *rqp = NULL;
                        return 0;
                }
@@ -3720,11 +3719,7 @@ EXPORT_SYMBOL(end_that_request_last);
 static inline void __end_request(struct request *rq, int uptodate,
                                 unsigned int nr_bytes)
 {
-       if (!end_that_request_chunk(rq, uptodate, nr_bytes)) {
-               blkdev_dequeue_request(rq);
-               add_disk_randomness(rq->rq_disk);
-               end_that_request_last(rq, uptodate);
-       }
+       __blk_end_request(rq, uptodate, nr_bytes);
 }
 
 /**
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to