diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-04-29 04:00:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:06:09 -0400 |
commit | d447ea2f30ec60370ddb99a668e5ac12995f043d (patch) | |
tree | f5d53c03d32323f3e916237f8ec0e0b2572f93b0 /kernel/cgroup.c | |
parent | 46ae220bea40bd1cf4abec2d5cdfb4f9396c7115 (diff) |
cgroups: add the trigger callback to struct cftype
Trigger callback can be used to receive a kick-up from the user space. The
string written is ignored.
The cftype->private is used for multiplexing events.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Paul Menage <menage@google.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r-- | kernel/cgroup.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 436e26f4d62..7c8cc514187 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -1410,6 +1410,10 @@ static ssize_t cgroup_file_write(struct file *file, const char __user *buf, | |||
1410 | return cft->write(cgrp, cft, file, buf, nbytes, ppos); | 1410 | return cft->write(cgrp, cft, file, buf, nbytes, ppos); |
1411 | if (cft->write_u64 || cft->write_s64) | 1411 | if (cft->write_u64 || cft->write_s64) |
1412 | return cgroup_write_X64(cgrp, cft, file, buf, nbytes, ppos); | 1412 | return cgroup_write_X64(cgrp, cft, file, buf, nbytes, ppos); |
1413 | if (cft->trigger) { | ||
1414 | int ret = cft->trigger(cgrp, (unsigned int)cft->private); | ||
1415 | return ret ? ret : nbytes; | ||
1416 | } | ||
1413 | return -EINVAL; | 1417 | return -EINVAL; |
1414 | } | 1418 | } |
1415 | 1419 | ||