aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/cgroups/resource_counter.txt
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2012-04-24 19:11:35 -0400
committerTejun Heo <tj@kernel.org>2012-04-27 17:36:45 -0400
commit4d8438f044d8aaac6fbba98316ba484dabea397d (patch)
tree90c63abf93502bfecff1f098732c2f0a0d13c024 /Documentation/cgroups/resource_counter.txt
parentc4c27fbdda4e8ba87806c415b6d15266b07bce4b (diff)
res_counter: Merge res_counter_charge and res_counter_charge_nofail
These two functions do almost the same thing and duplicate some code. Merge their implementation into a single common function. res_counter_charge_locked() takes one more parameter but it doesn't seem to be used outside res_counter.c yet anyway. There is no (intended) change in the behaviour. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Acked-by: Glauber Costa <glommer@parallels.com> Acked-by: Kirill A. Shutemov <kirill@shutemov.name> Cc: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'Documentation/cgroups/resource_counter.txt')
-rw-r--r--Documentation/cgroups/resource_counter.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/cgroups/resource_counter.txt b/Documentation/cgroups/resource_counter.txt
index 95b24d766eab..f3c4ec3626a2 100644
--- a/Documentation/cgroups/resource_counter.txt
+++ b/Documentation/cgroups/resource_counter.txt
@@ -77,11 +77,11 @@ to work with it.
77 where the charging failed. 77 where the charging failed.
78 78
79 d. int res_counter_charge_locked 79 d. int res_counter_charge_locked
80 (struct res_counter *rc, unsigned long val) 80 (struct res_counter *rc, unsigned long val, bool force)
81 81
82 The same as res_counter_charge(), but it must not acquire/release the 82 The same as res_counter_charge(), but it must not acquire/release the
83 res_counter->lock internally (it must be called with res_counter->lock 83 res_counter->lock internally (it must be called with res_counter->lock
84 held). 84 held). The force parameter indicates whether we can bypass the limit.
85 85
86 e. void res_counter_uncharge[_locked] 86 e. void res_counter_uncharge[_locked]
87 (struct res_counter *rc, unsigned long val) 87 (struct res_counter *rc, unsigned long val)