提交 9fd8d0e1 编写于 作者: T Tejun Heo 提交者: Jens Axboe

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: NTejun Heo <tj@kernel.org>
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 9eb55b03
...@@ -903,10 +903,14 @@ static inline void blk_end_request_all(struct request *rq, int error) ...@@ -903,10 +903,14 @@ static inline void blk_end_request_all(struct request *rq, int error)
* *
* Description: * Description:
* Complete the current consecutively mapped chunk from @rq. * 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);
} }
/** /**
...@@ -952,10 +956,14 @@ static inline void __blk_end_request_all(struct request *rq, int error) ...@@ -952,10 +956,14 @@ static inline void __blk_end_request_all(struct request *rq, int error)
* Description: * Description:
* Complete the current consecutively mapped chunk from @rq. Must * Complete the current consecutively mapped chunk from @rq. Must
* be called with queue lock held. * 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 *); extern void blk_complete_request(struct request *);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册