Re: [PATCH] Mark res_counter_charge(_locked) with __must_check
From: KAMEZAWA Hiroyuki
Date: Thu May 08 2008 - 05:36:05 EST
On Thu, 08 May 2008 13:05:44 +0400
Pavel Emelyanov <xemul@xxxxxxxxxx> 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@xxxxxxxxxx>
>
nice check :)
BTW, res_counter_charge_locked() should be extern function ?
Thanks,
-Kame
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/