diff options
author | Kirill A. Shutemov <kirill@shutemov.name> | 2010-05-26 17:42:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-27 12:12:44 -0400 |
commit | 907860ed381a31b0102f362df67c1c5cae6ef050 (patch) | |
tree | 4f47a6fe898b1f45da505fc0c27d98e66d42aa46 /include/linux/cgroup.h | |
parent | ac39cf8cb86c45eeac6a592ce0d58f9021a97235 (diff) |
cgroups: make cftype.unregister_event() void-returning
Since we are unable to handle an error returned by
cftype.unregister_event() properly, let's make the callback
void-returning.
mem_cgroup_unregister_event() has been rewritten to be a "never fail"
function. On mem_cgroup_usage_register_event() we save old buffer for
thresholds array and reuse it in mem_cgroup_usage_unregister_event() to
avoid allocation.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Phil Carmody <ext-phil.2.carmody@nokia.com>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Paul Menage <menage@google.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/cgroup.h')
-rw-r--r-- | include/linux/cgroup.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 8f78073d7caa..0c621604baa1 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -397,7 +397,7 @@ struct cftype { | |||
397 | * This callback must be implemented, if you want provide | 397 | * This callback must be implemented, if you want provide |
398 | * notification functionality. | 398 | * notification functionality. |
399 | */ | 399 | */ |
400 | int (*unregister_event)(struct cgroup *cgrp, struct cftype *cft, | 400 | void (*unregister_event)(struct cgroup *cgrp, struct cftype *cft, |
401 | struct eventfd_ctx *eventfd); | 401 | struct eventfd_ctx *eventfd); |
402 | }; | 402 | }; |
403 | 403 | ||