From: Pavel Emelyanov <xemul@openvz.org>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Balbir Singh <balbir@linux.vnet.ibm.com>,
Paul Menage <menage@google.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Mark res_counter_charge(_locked) with __must_check
Date: Thu, 08 May 2008 13:40:53 +0400 [thread overview]
Message-ID: <4822CAA5.9020401@openvz.org> (raw)
In-Reply-To: <20080508184038.f3f2af47.kamezawa.hiroyu@jp.fujitsu.com>
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
>
>
next prev parent reply other threads:[~2008-05-08 9:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-08 9:05 [PATCH] Mark res_counter_charge(_locked) with __must_check Pavel Emelyanov
2008-05-08 9:40 ` KAMEZAWA Hiroyuki
2008-05-08 9:40 ` Pavel Emelyanov [this message]
2008-05-09 0:15 ` KAMEZAWA Hiroyuki
2008-05-12 7:08 ` Pavel Emelyanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4822CAA5.9020401@openvz.org \
--to=xemul@openvz.org \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=menage@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox