summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2008-01-31 12:36:19 +0100
committerJens Axboe <jens.axboe@oracle.com>2008-02-01 09:26:33 +0100
commit22b132102f1540dd40f3e41df88796829b685f1a (patch)
tree20edc8316009b946ebd197b7aef7ccc041d02798 /block
parent640e248e44e2c550473550ca83668ceccad21dce (diff)
downloadlwn-22b132102f1540dd40f3e41df88796829b685f1a.tar.gz
lwn-22b132102f1540dd40f3e41df88796829b685f1a.zip
block: new end request handling interface should take unsigned byte counts
No point in passing signed integers as the byte count, they can never be negative. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block')
-rw-r--r--block/blk-core.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 8ff99440ee44..55cf293d907d 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1846,8 +1846,9 @@ EXPORT_SYMBOL(end_request);
* 0 - we are done with this request
* 1 - this request is not freed yet, it still has pending buffers.
**/
-static int blk_end_io(struct request *rq, int error, int nr_bytes,
- int bidi_bytes, int (drv_callback)(struct request *))
+static int blk_end_io(struct request *rq, int error, unsigned int nr_bytes,
+ unsigned int bidi_bytes,
+ int (drv_callback)(struct request *))
{
struct request_queue *q = rq->q;
unsigned long flags = 0UL;
@@ -1889,7 +1890,7 @@ static int blk_end_io(struct request *rq, int error, int nr_bytes,
* 0 - we are done with this request
* 1 - still buffers pending for this request
**/
-int blk_end_request(struct request *rq, int error, int nr_bytes)
+int blk_end_request(struct request *rq, int error, unsigned int nr_bytes)
{
return blk_end_io(rq, error, nr_bytes, 0, NULL);
}
@@ -1908,7 +1909,7 @@ EXPORT_SYMBOL_GPL(blk_end_request);
* 0 - we are done with this request
* 1 - still buffers pending for this request
**/
-int __blk_end_request(struct request *rq, int error, int nr_bytes)
+int __blk_end_request(struct request *rq, int error, unsigned int nr_bytes)
{
if (blk_fs_request(rq) || blk_pc_request(rq)) {
if (__end_that_request_first(rq, error, nr_bytes))
@@ -1937,8 +1938,8 @@ EXPORT_SYMBOL_GPL(__blk_end_request);
* 0 - we are done with this request
* 1 - still buffers pending for this request
**/
-int blk_end_bidi_request(struct request *rq, int error, int nr_bytes,
- int bidi_bytes)
+int blk_end_bidi_request(struct request *rq, int error, unsigned int nr_bytes,
+ unsigned int bidi_bytes)
{
return blk_end_io(rq, error, nr_bytes, bidi_bytes, NULL);
}
@@ -1969,7 +1970,8 @@ EXPORT_SYMBOL_GPL(blk_end_bidi_request);
* this request still has pending buffers or
* the driver doesn't want to finish this request yet.
**/
-int blk_end_request_callback(struct request *rq, int error, int nr_bytes,
+int blk_end_request_callback(struct request *rq, int error,
+ unsigned int nr_bytes,
int (drv_callback)(struct request *))
{
return blk_end_io(rq, error, nr_bytes, 0, drv_callback);