Skip to content

Commit

Permalink
blkio: Fix return code for mkdir calls
Browse files Browse the repository at this point in the history
If the cgroup hierarchy for blkio control groups is deeper than two
levels, kernel should not allow the creation of further levels. mkdir
system call does not except EINVAL as a return value. This patch
replaces EINVAL with more appropriate EPERM

Signed-off-by: Ciju Rajan K <ciju@linux.vnet.ibm.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
  • Loading branch information
Ciju Rajan K authored and Jens Axboe committed Aug 23, 2010
1 parent 9ee4747 commit 96aa1b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/blk-cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ blkiocg_create(struct cgroup_subsys *subsys, struct cgroup *cgroup)

/* Currently we do not support hierarchy deeper than two level (0,1) */
if (parent != cgroup->top_cgroup)
return ERR_PTR(-EINVAL);
return ERR_PTR(-EPERM);

blkcg = kzalloc(sizeof(*blkcg), GFP_KERNEL);
if (!blkcg)
Expand Down

0 comments on commit 96aa1b4

Please sign in to comment.