diff options
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r-- | kernel/cgroup.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 48348dde6d81..87bb0258fd27 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -573,7 +573,6 @@ static struct inode *cgroup_new_inode(mode_t mode, struct super_block *sb) | |||
573 | inode->i_mode = mode; | 573 | inode->i_mode = mode; |
574 | inode->i_uid = current_fsuid(); | 574 | inode->i_uid = current_fsuid(); |
575 | inode->i_gid = current_fsgid(); | 575 | inode->i_gid = current_fsgid(); |
576 | inode->i_blocks = 0; | ||
577 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; | 576 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
578 | inode->i_mapping->backing_dev_info = &cgroup_backing_dev_info; | 577 | inode->i_mapping->backing_dev_info = &cgroup_backing_dev_info; |
579 | } | 578 | } |
@@ -2945,7 +2944,11 @@ int cgroup_clone(struct task_struct *tsk, struct cgroup_subsys *subsys, | |||
2945 | parent = task_cgroup(tsk, subsys->subsys_id); | 2944 | parent = task_cgroup(tsk, subsys->subsys_id); |
2946 | 2945 | ||
2947 | /* Pin the hierarchy */ | 2946 | /* Pin the hierarchy */ |
2948 | atomic_inc(&parent->root->sb->s_active); | 2947 | if (!atomic_inc_not_zero(&parent->root->sb->s_active)) { |
2948 | /* We race with the final deactivate_super() */ | ||
2949 | mutex_unlock(&cgroup_mutex); | ||
2950 | return 0; | ||
2951 | } | ||
2949 | 2952 | ||
2950 | /* Keep the cgroup alive */ | 2953 | /* Keep the cgroup alive */ |
2951 | get_css_set(cg); | 2954 | get_css_set(cg); |