summaryrefslogtreecommitdiff
path: root/kernel/cpuset.c
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2009-04-02 16:57:29 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-02 19:04:54 -0700
commit099fca3225b39f7a3ed853036038054172b55581 (patch)
treec7a8863f9ca8a5c745297e9ee43b63494b6022d1 /kernel/cpuset.c
parentb6719ec1ad54e47e40633b19703f2c1254708842 (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 'kernel/cpuset.c')
-rw-r--r--kernel/cpuset.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index f76db9dcaa0..ee5ec386aa8 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1706,6 +1706,7 @@ static struct cftype files[] = {
.read_u64 = cpuset_read_u64,
.write_u64 = cpuset_write_u64,
.private = FILE_MEMORY_PRESSURE,
+ .mode = S_IRUGO,
},
{