|
@@ -104,15 +104,13 @@ void res_counter_init(struct res_counter *counter, struct res_counter *parent);
|
|
* units, e.g. numbers, bytes, Kbytes, etc
|
|
* units, e.g. numbers, bytes, Kbytes, etc
|
|
*
|
|
*
|
|
* returns 0 on success and <0 if the counter->usage will exceed the
|
|
* returns 0 on success and <0 if the counter->usage will exceed the
|
|
- * counter->limit _locked call expects the counter->lock to be taken
|
|
|
|
|
|
+ * counter->limit
|
|
*
|
|
*
|
|
* charge_nofail works the same, except that it charges the resource
|
|
* charge_nofail works the same, except that it charges the resource
|
|
* counter unconditionally, and returns < 0 if the after the current
|
|
* counter unconditionally, and returns < 0 if the after the current
|
|
* charge we are over limit.
|
|
* charge we are over limit.
|
|
*/
|
|
*/
|
|
|
|
|
|
-int __must_check res_counter_charge_locked(struct res_counter *counter,
|
|
|
|
- unsigned long val, bool force);
|
|
|
|
int __must_check res_counter_charge(struct res_counter *counter,
|
|
int __must_check res_counter_charge(struct res_counter *counter,
|
|
unsigned long val, struct res_counter **limit_fail_at);
|
|
unsigned long val, struct res_counter **limit_fail_at);
|
|
int res_counter_charge_nofail(struct res_counter *counter,
|
|
int res_counter_charge_nofail(struct res_counter *counter,
|
|
@@ -125,12 +123,10 @@ int res_counter_charge_nofail(struct res_counter *counter,
|
|
* @val: the amount of the resource
|
|
* @val: the amount of the resource
|
|
*
|
|
*
|
|
* these calls check for usage underflow and show a warning on the console
|
|
* these calls check for usage underflow and show a warning on the console
|
|
- * _locked call expects the counter->lock to be taken
|
|
|
|
*
|
|
*
|
|
* returns the total charges still present in @counter.
|
|
* returns the total charges still present in @counter.
|
|
*/
|
|
*/
|
|
|
|
|
|
-u64 res_counter_uncharge_locked(struct res_counter *counter, unsigned long val);
|
|
|
|
u64 res_counter_uncharge(struct res_counter *counter, unsigned long val);
|
|
u64 res_counter_uncharge(struct res_counter *counter, unsigned long val);
|
|
|
|
|
|
u64 res_counter_uncharge_until(struct res_counter *counter,
|
|
u64 res_counter_uncharge_until(struct res_counter *counter,
|