diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-01-06 09:04:32 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-01-06 09:04:32 +0100 |
| commit | d12418fdeafdc08dd5bbec89d3e07e47ee75da55 (patch) | |
| tree | ac94d5bf58360b89fc7439fb52182c17d0674b0a /kernel/cgroup.c | |
| parent | c2d1cec1c77f7714672c1efeae075424c929e0d5 (diff) | |
| parent | 238c6d54830c624f34ac9cf123ac04aebfca5013 (diff) | |
Merge branch 'linus' into cpus4096
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 48348dde6d8..87bb0258fd2 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) inode->i_mode = mode; inode->i_uid = current_fsuid(); inode->i_gid = current_fsgid(); - inode->i_blocks = 0; inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; inode->i_mapping->backing_dev_info = &cgroup_backing_dev_info; } @@ -2945,7 +2944,11 @@ int cgroup_clone(struct task_struct *tsk, struct cgroup_subsys *subsys, parent = task_cgroup(tsk, subsys->subsys_id); /* Pin the hierarchy */ - atomic_inc(&parent->root->sb->s_active); + if (!atomic_inc_not_zero(&parent->root->sb->s_active)) { + /* We race with the final deactivate_super() */ + mutex_unlock(&cgroup_mutex); + return 0; + } /* Keep the cgroup alive */ get_css_set(cg); |
