lkml.org 
[lkml]   [2008]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] Mark res_counter_charge(_locked) with __must_check
    KAMEZAWA Hiroyuki wrote:
    > On Thu, 08 May 2008 13:05:44 +0400
    > Pavel Emelyanov <xemul@openvz.org> wrote:
    >
    >> Ignoring theirs return value may result in counter underflow
    >> in the future - when the value charged will be uncharged (or in
    >> "leaks" - when the value is not uncharged).
    >>
    >> This also prevents from using charging routines to decrement the
    >> counter value (i.e. uncharge it) ;)
    >>
    >> (Current code works OK with res_counter, however :) )
    >>
    >> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
    >>
    > nice check :)

    Thanks!

    > BTW, res_counter_charge_locked() should be extern function ?

    What do you mean? It is extern as well as the res_counter_charge
    and uncharge ones are, but functions may have forward declarations
    w/o extern keyword AFAIK ;)

    > Thanks,
    > -Kame
    >
    >



    \
     
     \ /
      Last update: 2008-05-08 11:47    [W:4.065 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site