aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-11-27 18:17:27 -0500
committerTejun Heo <tj@kernel.org>2013-11-27 18:17:27 -0500
commitc729b11edf7458a939556e1889446184f42f37a7 (patch)
tree157c8a20d0c9b0cf9b5835855c9bfe3bfacb98d6 /kernel/cgroup.c
parentedab95103d3a1eb5e3faf977eae4ad0b5bf5669c (diff)
parente605b36575e896edd8161534550c9ea021b03bc0 (diff)
cgroup: Merge branch 'for-3.13-fixes' into for-3.14
Pull to receive e605b36575e8 ("cgroup: fix cgroup_subsys_state leak for seq_files") as for-3.14 is scheduled to have a lot of changes which depend on it. Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index be42967f4f1a..34fd1be0d9bf 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -166,6 +166,7 @@ static void cgroup_destroy_css_killed(struct cgroup *cgrp);
166static int cgroup_destroy_locked(struct cgroup *cgrp); 166static int cgroup_destroy_locked(struct cgroup *cgrp);
167static int cgroup_addrm_files(struct cgroup *cgrp, struct cftype cfts[], 167static int cgroup_addrm_files(struct cgroup *cgrp, struct cftype cfts[],
168 bool is_add); 168 bool is_add);
169static int cgroup_file_release(struct inode *inode, struct file *file);
169 170
170/** 171/**
171 * cgroup_css - obtain a cgroup's css for the specified subsystem 172 * cgroup_css - obtain a cgroup's css for the specified subsystem
@@ -2394,7 +2395,7 @@ static const struct file_operations cgroup_seqfile_operations = {
2394 .read = seq_read, 2395 .read = seq_read,
2395 .write = cgroup_file_write, 2396 .write = cgroup_file_write,
2396 .llseek = seq_lseek, 2397 .llseek = seq_lseek,
2397 .release = single_release, 2398 .release = cgroup_file_release,
2398}; 2399};
2399 2400
2400static int cgroup_file_open(struct inode *inode, struct file *file) 2401static int cgroup_file_open(struct inode *inode, struct file *file)
@@ -2455,6 +2456,8 @@ static int cgroup_file_release(struct inode *inode, struct file *file)
2455 ret = cft->release(inode, file); 2456 ret = cft->release(inode, file);
2456 if (css->ss) 2457 if (css->ss)
2457 css_put(css); 2458 css_put(css);
2459 if (file->f_op == &cgroup_seqfile_operations)
2460 single_release(inode, file);
2458 return ret; 2461 return ret;
2459} 2462}
2460 2463