Signed-off-by: Jordi Pujol cgroup: Add write permission for the group of users. --- linux-2.6.37/kernel/cgroup.c +++ linux-2.6.37/kernel/cgroup.c 2011-01-30 15:16:00.556562499 +0100 @@ -1441,7 +1441,7 @@ static int cgroup_set_super(struct super static int cgroup_get_rootdir(struct super_block *sb) { struct inode *inode = - cgroup_new_inode(S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR, sb); + cgroup_new_inode(S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR | S_IWGRP, sb); struct dentry *dentry; if (!inode) @@ -2265,9 +2265,9 @@ static int cgroup_create_dir(struct cgro * @cft: the control file in question * * returns cft->mode if ->mode is not 0 - * returns S_IRUGO|S_IWUSR if it has both a read and a write handler + * returns S_IRUGO|S_IWUSR|S_IWGRP if it has both a read and a write handler * returns S_IRUGO if it has only a read handler - * returns S_IWUSR if it has only a write hander + * returns S_IWUSR|S_IWGRP if it has only a write hander */ static mode_t cgroup_file_mode(const struct cftype *cft) { @@ -2281,8 +2281,10 @@ static mode_t cgroup_file_mode(const str mode |= S_IRUGO; if (cft->write || cft->write_u64 || cft->write_s64 || - cft->write_string || cft->trigger) + cft->write_string || cft->trigger) { mode |= S_IWUSR; + mode |= S_IWGRP; + } return mode; } @@ -3244,7 +3246,7 @@ static struct cftype files[] = { .open = cgroup_tasks_open, .write_u64 = cgroup_tasks_write, .release = cgroup_pidlist_release, - .mode = S_IRUGO | S_IWUSR, + .mode = S_IRUGO | S_IWUSR | S_IWGRP, }, { .name = CGROUP_FILE_GENERIC_PREFIX "procs",