diff options
-rw-r--r-- | block/blk-core.c | 16 | ||||
-rw-r--r-- | include/linux/blkdev.h | 15 |
2 files changed, 18 insertions, 13 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); | |||
1846 | * 0 - we are done with this request | 1846 | * 0 - we are done with this request |
1847 | * 1 - this request is not freed yet, it still has pending buffers. | 1847 | * 1 - this request is not freed yet, it still has pending buffers. |
1848 | **/ | 1848 | **/ |
1849 | static int blk_end_io(struct request *rq, int error, int nr_bytes, | 1849 | static int blk_end_io(struct request *rq, int error, unsigned int nr_bytes, |
1850 | int bidi_bytes, int (drv_callback)(struct request *)) | 1850 | unsigned int bidi_bytes, |
1851 | int (drv_callback)(struct request *)) | ||
1851 | { | 1852 | { |
1852 | struct request_queue *q = rq->q; | 1853 | struct request_queue *q = rq->q; |
1853 | unsigned long flags = 0UL; | 1854 | unsigned long flags = 0UL; |
@@ -1889,7 +1890,7 @@ static int blk_end_io(struct request *rq, int error, int nr_bytes, | |||
1889 | * 0 - we are done with this request | 1890 | * 0 - we are done with this request |
1890 | * 1 - still buffers pending for this request | 1891 | * 1 - still buffers pending for this request |
1891 | **/ | 1892 | **/ |
1892 | int blk_end_request(struct request *rq, int error, int nr_bytes) | 1893 | int blk_end_request(struct request *rq, int error, unsigned int nr_bytes) |
1893 | { | 1894 | { |
1894 | return blk_end_io(rq, error, nr_bytes, 0, NULL); | 1895 | return blk_end_io(rq, error, nr_bytes, 0, NULL); |
1895 | } | 1896 | } |
@@ -1908,7 +1909,7 @@ EXPORT_SYMBOL_GPL(blk_end_request); | |||
1908 | * 0 - we are done with this request | 1909 | * 0 - we are done with this request |
1909 | * 1 - still buffers pending for this request | 1910 | * 1 - still buffers pending for this request |
1910 | **/ | 1911 | **/ |
1911 | int __blk_end_request(struct request *rq, int error, int nr_bytes) | 1912 | int __blk_end_request(struct request *rq, int error, unsigned int nr_bytes) |
1912 | { | 1913 | { |
1913 | if (blk_fs_request(rq) || blk_pc_request(rq)) { | 1914 | if (blk_fs_request(rq) || blk_pc_request(rq)) { |
1914 | if (__end_that_request_first(rq, error, nr_bytes)) | 1915 | if (__end_that_request_first(rq, error, nr_bytes)) |
@@ -1937,8 +1938,8 @@ EXPORT_SYMBOL_GPL(__blk_end_request); | |||
1937 | * 0 - we are done with this request | 1938 | * 0 - we are done with this request |
1938 | * 1 - still buffers pending for this request | 1939 | * 1 - still buffers pending for this request |
1939 | **/ | 1940 | **/ |
1940 | int blk_end_bidi_request(struct request *rq, int error, int nr_bytes, | 1941 | int blk_end_bidi_request(struct request *rq, int error, unsigned int nr_bytes, |
1941 | int bidi_bytes) | 1942 | unsigned int bidi_bytes) |
1942 | { | 1943 | { |
1943 | return blk_end_io(rq, error, nr_bytes, bidi_bytes, NULL); | 1944 | return blk_end_io(rq, error, nr_bytes, bidi_bytes, NULL); |
1944 | } | 1945 | } |
@@ -1969,7 +1970,8 @@ EXPORT_SYMBOL_GPL(blk_end_bidi_request); | |||
1969 | * this request still has pending buffers or | 1970 | * this request still has pending buffers or |
1970 | * the driver doesn't want to finish this request yet. | 1971 | * the driver doesn't want to finish this request yet. |
1971 | **/ | 1972 | **/ |
1972 | int blk_end_request_callback(struct request *rq, int error, int nr_bytes, | 1973 | int blk_end_request_callback(struct request *rq, int error, |
1974 | unsigned int nr_bytes, | ||
1973 | int (drv_callback)(struct request *)) | 1975 | int (drv_callback)(struct request *)) |
1974 | { | 1976 | { |
1975 | return blk_end_io(rq, error, nr_bytes, 0, drv_callback); | 1977 | return blk_end_io(rq, error, nr_bytes, 0, drv_callback); |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index e18d4192f6e8..cf170391c474 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -655,15 +655,18 @@ static inline void blk_run_address_space(struct address_space *mapping) | |||
655 | * blk_end_request() for parts of the original function. | 655 | * blk_end_request() for parts of the original function. |
656 | * This prevents code duplication in drivers. | 656 | * This prevents code duplication in drivers. |
657 | */ | 657 | */ |
658 | extern int blk_end_request(struct request *rq, int error, int nr_bytes); | 658 | extern int blk_end_request(struct request *rq, int error, |
659 | extern int __blk_end_request(struct request *rq, int error, int nr_bytes); | 659 | unsigned int nr_bytes); |
660 | extern int blk_end_bidi_request(struct request *rq, int error, int nr_bytes, | 660 | extern int __blk_end_request(struct request *rq, int error, |
661 | int bidi_bytes); | 661 | unsigned int nr_bytes); |
662 | extern int blk_end_bidi_request(struct request *rq, int error, | ||
663 | unsigned int nr_bytes, unsigned int bidi_bytes); | ||
662 | extern void end_request(struct request *, int); | 664 | extern void end_request(struct request *, int); |
663 | extern void end_queued_request(struct request *, int); | 665 | extern void end_queued_request(struct request *, int); |
664 | extern void end_dequeued_request(struct request *, int); | 666 | extern void end_dequeued_request(struct request *, int); |
665 | extern int blk_end_request_callback(struct request *rq, int error, int nr_bytes, | 667 | extern int blk_end_request_callback(struct request *rq, int error, |
666 | int (drv_callback)(struct request *)); | 668 | unsigned int nr_bytes, |
669 | int (drv_callback)(struct request *)); | ||
667 | extern void blk_complete_request(struct request *); | 670 | extern void blk_complete_request(struct request *); |
668 | 671 | ||
669 | /* | 672 | /* |