lkml.org 
[lkml]   [2009]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 01/14] block: make blk_end_request_cur() return bool
    Date
    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>
    ---
    include/linux/blkdev.h | 16 ++++++++++++----
    1 files changed, 12 insertions(+), 4 deletions(-)

    diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
    index 12c545e..3a5b1bd 100644
    --- a/include/linux/blkdev.h
    +++ b/include/linux/blkdev.h
    @@ -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);
    }

    /**
    @@ -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 *);
    --
    1.6.0.2


    \
     
     \ /
      Last update: 2009-04-28 06:13    [W:0.025 / U:0.244 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site