diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-04-02 19:57:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-02 22:04:54 -0400 |
commit | 099fca3225b39f7a3ed853036038054172b55581 (patch) | |
tree | c7a8863f9ca8a5c745297e9ee43b63494b6022d1 /include/linux/cgroup.h | |
parent | b6719ec1ad54e47e40633b19703f2c1254708842 (diff) |
cgroups: show correct file mode
We have some read-only files and write-only files, but currently they are
all set to 0644, which is counter-intuitive and cause trouble for some
cgroup tools like libcgroup.
This patch adds 'mode' to struct cftype to allow cgroup subsys to set it's
own files' file mode, and for the most cases cft->mode can be default to 0
and cgroup will figure out proper mode.
Acked-by: Paul Menage <menage@google.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: 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 | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 7d824b80b3d7..b2816fba5306 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -258,6 +258,11 @@ struct cftype { | |||
258 | */ | 258 | */ |
259 | char name[MAX_CFTYPE_NAME]; | 259 | char name[MAX_CFTYPE_NAME]; |
260 | int private; | 260 | int private; |
261 | /* | ||
262 | * If not 0, file mode is set to this value, otherwise it will | ||
263 | * be figured out automatically | ||
264 | */ | ||
265 | mode_t mode; | ||
261 | 266 | ||
262 | /* | 267 | /* |
263 | * If non-zero, defines the maximum length of string that can | 268 | * If non-zero, defines the maximum length of string that can |