Skip to content

Commit

Permalink
block: make blk_end_request_cur() return bool
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
htejun authored and Jens Axboe committed Apr 28, 2009
1 parent 9eb55b0 commit 9fd8d0e
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions include/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -903,10 +903,14 @@ static inline void blk_end_request_all(struct request *rq, int error)
*
* Description:
* Complete the current consecutively mapped chunk from @rq.
*
* Return:
* %false - we are done with this request
* %true - still buffers pending for this request
*/
static inline void blk_end_request_cur(struct request *rq, int error)
static inline bool blk_end_request_cur(struct request *rq, int error)
{
blk_end_request(rq, error, rq->hard_cur_sectors << 9);
return blk_end_request(rq, error, rq->hard_cur_sectors << 9);
}

/**
Expand Down Expand Up @@ -952,10 +956,14 @@ static inline void __blk_end_request_all(struct request *rq, int error)
* Description:
* Complete the current consecutively mapped chunk from @rq. Must
* be called with queue lock held.
*
* Return:
* %false - we are done with this request
* %true - still buffers pending for this request
*/
static inline void __blk_end_request_cur(struct request *rq, int error)
static inline bool __blk_end_request_cur(struct request *rq, int error)
{
__blk_end_request(rq, error, rq->hard_cur_sectors << 9);
return __blk_end_request(rq, error, rq->hard_cur_sectors << 9);
}

extern void blk_complete_request(struct request *);
Expand Down

0 comments on commit 9fd8d0e

Please sign in to comment.