diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-10 06:04:41 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-10 06:04:41 -0500 |
commit | b17304245f0db0ac69b795c411407808f3f2796d (patch) | |
tree | 63ed3915d9295bd08f640bf25c322064ba787fad /include/linux/res_counter.h | |
parent | 889c92d21db40be0b7d22a59395060237895bb85 (diff) | |
parent | 9a100a4464917b5ffff3a8ce1c2758088fd9bb32 (diff) |
Merge branch 'linus' into x86/setup-lzma
Conflicts:
init/do_mounts_rd.c
Diffstat (limited to 'include/linux/res_counter.h')
-rw-r--r-- | include/linux/res_counter.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h index 271c1c2c9f6f..dede0a2cfc45 100644 --- a/include/linux/res_counter.h +++ b/include/linux/res_counter.h | |||
@@ -43,6 +43,10 @@ struct res_counter { | |||
43 | * the routines below consider this to be IRQ-safe | 43 | * the routines below consider this to be IRQ-safe |
44 | */ | 44 | */ |
45 | spinlock_t lock; | 45 | spinlock_t lock; |
46 | /* | ||
47 | * Parent counter, used for hierarchial resource accounting | ||
48 | */ | ||
49 | struct res_counter *parent; | ||
46 | }; | 50 | }; |
47 | 51 | ||
48 | /** | 52 | /** |
@@ -87,7 +91,7 @@ enum { | |||
87 | * helpers for accounting | 91 | * helpers for accounting |
88 | */ | 92 | */ |
89 | 93 | ||
90 | void res_counter_init(struct res_counter *counter); | 94 | void res_counter_init(struct res_counter *counter, struct res_counter *parent); |
91 | 95 | ||
92 | /* | 96 | /* |
93 | * charge - try to consume more resource. | 97 | * charge - try to consume more resource. |
@@ -103,7 +107,7 @@ void res_counter_init(struct res_counter *counter); | |||
103 | int __must_check res_counter_charge_locked(struct res_counter *counter, | 107 | int __must_check res_counter_charge_locked(struct res_counter *counter, |
104 | unsigned long val); | 108 | unsigned long val); |
105 | int __must_check res_counter_charge(struct res_counter *counter, | 109 | int __must_check res_counter_charge(struct res_counter *counter, |
106 | unsigned long val); | 110 | unsigned long val, struct res_counter **limit_fail_at); |
107 | 111 | ||
108 | /* | 112 | /* |
109 | * uncharge - tell that some portion of the resource is released | 113 | * uncharge - tell that some portion of the resource is released |