diff options
author | Paul Menage <menage@google.com> | 2008-07-25 04:47:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-25 13:53:35 -0400 |
commit | 84eea842886ac35020be6043e04748ed22014359 (patch) | |
tree | acd2bb7c3bc267a032b5e637c598708f38c68cb3 /include/linux/cgroup.h | |
parent | e788e066c651b1bbf4a927dc95395c1aa13be436 (diff) |
cgroups: misc cleanups to write_string patchset
This patch contains cleanups suggested by reviewers for the recent
write_string() patchset:
- pair cgroup_lock_live_group() with cgroup_unlock() in cgroup.c for
clarity, rather than directly unlocking cgroup_mutex.
- make the return type of cgroup_lock_live_group() a bool
- use a #define'd constant for the local buffer size in read/write functions
Signed-off-by: Paul Menage <menage@google.com>
Cc: Paul Jackson <pj@sgi.com>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: Balbir Singh <balbir@in.ibm.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index e78377a91a74..cc59d3a21d87 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -21,11 +21,13 @@ | |||
21 | struct cgroupfs_root; | 21 | struct cgroupfs_root; |
22 | struct cgroup_subsys; | 22 | struct cgroup_subsys; |
23 | struct inode; | 23 | struct inode; |
24 | struct cgroup; | ||
24 | 25 | ||
25 | extern int cgroup_init_early(void); | 26 | extern int cgroup_init_early(void); |
26 | extern int cgroup_init(void); | 27 | extern int cgroup_init(void); |
27 | extern void cgroup_init_smp(void); | 28 | extern void cgroup_init_smp(void); |
28 | extern void cgroup_lock(void); | 29 | extern void cgroup_lock(void); |
30 | extern bool cgroup_lock_live_group(struct cgroup *cgrp); | ||
29 | extern void cgroup_unlock(void); | 31 | extern void cgroup_unlock(void); |
30 | extern void cgroup_fork(struct task_struct *p); | 32 | extern void cgroup_fork(struct task_struct *p); |
31 | extern void cgroup_fork_callbacks(struct task_struct *p); | 33 | extern void cgroup_fork_callbacks(struct task_struct *p); |
@@ -295,8 +297,6 @@ int cgroup_add_files(struct cgroup *cgrp, | |||
295 | 297 | ||
296 | int cgroup_is_removed(const struct cgroup *cgrp); | 298 | int cgroup_is_removed(const struct cgroup *cgrp); |
297 | 299 | ||
298 | int cgroup_lock_live_group(struct cgroup *cgrp); | ||
299 | |||
300 | int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen); | 300 | int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen); |
301 | 301 | ||
302 | int cgroup_task_count(const struct cgroup *cgrp); | 302 | int cgroup_task_count(const struct cgroup *cgrp); |