lkml.org 
[lkml]   [2012]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2/3] writeback: fix incorrect return value type of bdi_dirty_limit
    Date
    unsigned long bdi_dirty_limit(struct backing_dev_info *bdi, unsigned long dirty)

    Above function return type is unsigned long, but return value is
    kept in "u64 bdi_dirty".
    It can return incorrect value by type casting.

    Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
    ---
    mm/page-writeback.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/mm/page-writeback.c b/mm/page-writeback.c
    index 49133b6..73a7a06 100644
    --- a/mm/page-writeback.c
    +++ b/mm/page-writeback.c
    @@ -546,7 +546,7 @@ static unsigned long hard_dirty_limit(unsigned long thresh)
    */
    unsigned long bdi_dirty_limit(struct backing_dev_info *bdi, unsigned long dirty)
    {
    - u64 bdi_dirty;
    + unsigned long bdi_dirty;
    long numerator, denominator;

    /*
    --
    1.7.9.5


    \
     
     \ /
      Last update: 2012-08-18 12:01    [W:0.028 / U:0.224 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site