diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-10-13 03:24:51 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-10-13 03:24:59 -0400 |
commit | 2c96c142e941041973faab20ca3b82d57f435c5e (patch) | |
tree | 45188f0ecb3f4bb7408a7219f8fcd041d500235a /kernel/cgroup.c | |
parent | 3c355863fb32070a2800f41106519c5c3038623a (diff) | |
parent | 8ad807318fcd62aba0e18c7c7fbfcc1af3fcdbab (diff) |
Merge branch 'tracing/urgent' into tracing/core
Merge reason: Pick up tracing/filters fix from the urgent queue,
we will queue up dependent patches.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r-- | kernel/cgroup.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 7ccba4bc5e3b..ca83b73fba19 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -703,7 +703,7 @@ static int cgroup_mkdir(struct inode *dir, struct dentry *dentry, int mode); | |||
703 | static int cgroup_rmdir(struct inode *unused_dir, struct dentry *dentry); | 703 | static int cgroup_rmdir(struct inode *unused_dir, struct dentry *dentry); |
704 | static int cgroup_populate_dir(struct cgroup *cgrp); | 704 | static int cgroup_populate_dir(struct cgroup *cgrp); |
705 | static const struct inode_operations cgroup_dir_inode_operations; | 705 | static const struct inode_operations cgroup_dir_inode_operations; |
706 | static struct file_operations proc_cgroupstats_operations; | 706 | static const struct file_operations proc_cgroupstats_operations; |
707 | 707 | ||
708 | static struct backing_dev_info cgroup_backing_dev_info = { | 708 | static struct backing_dev_info cgroup_backing_dev_info = { |
709 | .name = "cgroup", | 709 | .name = "cgroup", |
@@ -1863,7 +1863,7 @@ static int cgroup_seqfile_release(struct inode *inode, struct file *file) | |||
1863 | return single_release(inode, file); | 1863 | return single_release(inode, file); |
1864 | } | 1864 | } |
1865 | 1865 | ||
1866 | static struct file_operations cgroup_seqfile_operations = { | 1866 | static const struct file_operations cgroup_seqfile_operations = { |
1867 | .read = seq_read, | 1867 | .read = seq_read, |
1868 | .write = cgroup_file_write, | 1868 | .write = cgroup_file_write, |
1869 | .llseek = seq_lseek, | 1869 | .llseek = seq_lseek, |
@@ -1922,7 +1922,7 @@ static int cgroup_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
1922 | return simple_rename(old_dir, old_dentry, new_dir, new_dentry); | 1922 | return simple_rename(old_dir, old_dentry, new_dir, new_dentry); |
1923 | } | 1923 | } |
1924 | 1924 | ||
1925 | static struct file_operations cgroup_file_operations = { | 1925 | static const struct file_operations cgroup_file_operations = { |
1926 | .read = cgroup_file_read, | 1926 | .read = cgroup_file_read, |
1927 | .write = cgroup_file_write, | 1927 | .write = cgroup_file_write, |
1928 | .llseek = generic_file_llseek, | 1928 | .llseek = generic_file_llseek, |
@@ -3369,7 +3369,7 @@ static int cgroup_open(struct inode *inode, struct file *file) | |||
3369 | return single_open(file, proc_cgroup_show, pid); | 3369 | return single_open(file, proc_cgroup_show, pid); |
3370 | } | 3370 | } |
3371 | 3371 | ||
3372 | struct file_operations proc_cgroup_operations = { | 3372 | const struct file_operations proc_cgroup_operations = { |
3373 | .open = cgroup_open, | 3373 | .open = cgroup_open, |
3374 | .read = seq_read, | 3374 | .read = seq_read, |
3375 | .llseek = seq_lseek, | 3375 | .llseek = seq_lseek, |
@@ -3398,7 +3398,7 @@ static int cgroupstats_open(struct inode *inode, struct file *file) | |||
3398 | return single_open(file, proc_cgroupstats_show, NULL); | 3398 | return single_open(file, proc_cgroupstats_show, NULL); |
3399 | } | 3399 | } |
3400 | 3400 | ||
3401 | static struct file_operations proc_cgroupstats_operations = { | 3401 | static const struct file_operations proc_cgroupstats_operations = { |
3402 | .open = cgroupstats_open, | 3402 | .open = cgroupstats_open, |
3403 | .read = seq_read, | 3403 | .read = seq_read, |
3404 | .llseek = seq_lseek, | 3404 | .llseek = seq_lseek, |
@@ -3708,8 +3708,10 @@ static void check_for_release(struct cgroup *cgrp) | |||
3708 | void __css_put(struct cgroup_subsys_state *css) | 3708 | void __css_put(struct cgroup_subsys_state *css) |
3709 | { | 3709 | { |
3710 | struct cgroup *cgrp = css->cgroup; | 3710 | struct cgroup *cgrp = css->cgroup; |
3711 | int val; | ||
3711 | rcu_read_lock(); | 3712 | rcu_read_lock(); |
3712 | if (atomic_dec_return(&css->refcnt) == 1) { | 3713 | val = atomic_dec_return(&css->refcnt); |
3714 | if (val == 1) { | ||
3713 | if (notify_on_release(cgrp)) { | 3715 | if (notify_on_release(cgrp)) { |
3714 | set_bit(CGRP_RELEASABLE, &cgrp->flags); | 3716 | set_bit(CGRP_RELEASABLE, &cgrp->flags); |
3715 | check_for_release(cgrp); | 3717 | check_for_release(cgrp); |
@@ -3717,6 +3719,7 @@ void __css_put(struct cgroup_subsys_state *css) | |||
3717 | cgroup_wakeup_rmdir_waiter(cgrp); | 3719 | cgroup_wakeup_rmdir_waiter(cgrp); |
3718 | } | 3720 | } |
3719 | rcu_read_unlock(); | 3721 | rcu_read_unlock(); |
3722 | WARN_ON_ONCE(val < 1); | ||
3720 | } | 3723 | } |
3721 | 3724 | ||
3722 | /* | 3725 | /* |