aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 501f6845cc73..e33c8356b3da 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -883,6 +883,22 @@ static inline bool blk_end_request(struct request *rq, int error,
883} 883}
884 884
885/** 885/**
886 * blk_end_request_all - Helper function for drives to finish the request.
887 * @rq: the request to finish
888 * @err: %0 for success, < %0 for error
889 *
890 * Description:
891 * Completely finish @rq.
892 */
893static inline void blk_end_request_all(struct request *rq, int error)
894{
895 bool pending;
896
897 pending = blk_end_request(rq, error, blk_rq_bytes(rq));
898 BUG_ON(pending);
899}
900
901/**
886 * __blk_end_request - Helper function for drivers to complete the request. 902 * __blk_end_request - Helper function for drivers to complete the request.
887 * @rq: the request being processed 903 * @rq: the request being processed
888 * @error: %0 for success, < %0 for error 904 * @error: %0 for success, < %0 for error
@@ -902,6 +918,22 @@ static inline bool __blk_end_request(struct request *rq, int error,
902} 918}
903 919
904/** 920/**
921 * __blk_end_request_all - Helper function for drives to finish the request.
922 * @rq: the request to finish
923 * @err: %0 for success, < %0 for error
924 *
925 * Description:
926 * Completely finish @rq. Must be called with queue lock held.
927 */
928static inline void __blk_end_request_all(struct request *rq, int error)
929{
930 bool pending;
931
932 pending = __blk_end_request(rq, error, blk_rq_bytes(rq));
933 BUG_ON(pending);
934}
935
936/**
905 * end_request - end I/O on the current segment of the request 937 * end_request - end I/O on the current segment of the request
906 * @rq: the request being processed 938 * @rq: the request being processed
907 * @uptodate: error value or %0/%1 uptodate flag 939 * @uptodate: error value or %0/%1 uptodate flag