diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2010-05-21 15:27:26 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-05-21 15:27:26 -0400 |
commit | ee9a3607fb03e804ddf624544105f4e34260c380 (patch) | |
tree | ce41b6e0fa10982a306f6c142a92dbf3c9961284 /block/blk-cgroup.c | |
parent | b492e95be0ae672922f4734acf3f5d35c30be948 (diff) | |
parent | d515e86e639890b33a09390d062b0831664f04a2 (diff) |
Merge branch 'master' into for-2.6.35
Conflicts:
fs/ext3/fsync.c
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r-- | block/blk-cgroup.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 60bb049b6106..a6809645d212 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
@@ -956,16 +956,16 @@ static void blkiocg_destroy(struct cgroup_subsys *subsys, struct cgroup *cgroup) | |||
956 | static struct cgroup_subsys_state * | 956 | static struct cgroup_subsys_state * |
957 | blkiocg_create(struct cgroup_subsys *subsys, struct cgroup *cgroup) | 957 | blkiocg_create(struct cgroup_subsys *subsys, struct cgroup *cgroup) |
958 | { | 958 | { |
959 | struct blkio_cgroup *blkcg, *parent_blkcg; | 959 | struct blkio_cgroup *blkcg; |
960 | struct cgroup *parent = cgroup->parent; | ||
960 | 961 | ||
961 | if (!cgroup->parent) { | 962 | if (!parent) { |
962 | blkcg = &blkio_root_cgroup; | 963 | blkcg = &blkio_root_cgroup; |
963 | goto done; | 964 | goto done; |
964 | } | 965 | } |
965 | 966 | ||
966 | /* Currently we do not support hierarchy deeper than two level (0,1) */ | 967 | /* Currently we do not support hierarchy deeper than two level (0,1) */ |
967 | parent_blkcg = cgroup_to_blkio_cgroup(cgroup->parent); | 968 | if (parent != cgroup->top_cgroup) |
968 | if (css_depth(&parent_blkcg->css) > 0) | ||
969 | return ERR_PTR(-EINVAL); | 969 | return ERR_PTR(-EINVAL); |
970 | 970 | ||
971 | blkcg = kzalloc(sizeof(*blkcg), GFP_KERNEL); | 971 | blkcg = kzalloc(sizeof(*blkcg), GFP_KERNEL); |