Skip to content

Commit 9fd8d0e

Browse files
htejunJens Axboe
authored andcommitted
block: make blk_end_request_cur() return bool
In the process of mindlessly copying [__]blk_end_request_all(), [__]blk_end_request_cur() ended up returning void even though they're partial completion functions. Fix it. [ Impact: fix braindead API ] Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
1 parent 9eb55b0 commit 9fd8d0e

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

‎include/linux/blkdev.h‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -903,10 +903,14 @@ static inline void blk_end_request_all(struct request *rq, int error)
903903
*
904904
* Description:
905905
* Complete the current consecutively mapped chunk from @rq.
906+
*
907+
* Return:
908+
* %false - we are done with this request
909+
* %true - still buffers pending for this request
906910
*/
907-
static inline void blk_end_request_cur(struct request *rq, int error)
911+
static inline bool blk_end_request_cur(struct request *rq, int error)
908912
{
909-
blk_end_request(rq, error, rq->hard_cur_sectors << 9);
913+
return blk_end_request(rq, error, rq->hard_cur_sectors << 9);
910914
}
911915

912916
/**
@@ -952,10 +956,14 @@ static inline void __blk_end_request_all(struct request *rq, int error)
952956
* Description:
953957
* Complete the current consecutively mapped chunk from @rq. Must
954958
* be called with queue lock held.
959+
*
960+
* Return:
961+
* %false - we are done with this request
962+
* %true - still buffers pending for this request
955963
*/
956-
static inline void __blk_end_request_cur(struct request *rq, int error)
964+
static inline bool __blk_end_request_cur(struct request *rq, int error)
957965
{
958-
__blk_end_request(rq, error, rq->hard_cur_sectors << 9);
966+
return __blk_end_request(rq, error, rq->hard_cur_sectors << 9);
959967
}
960968

961969
extern void blk_complete_request(struct request *);

0 commit comments

Comments
 (0)