aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/cgroup.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index a7b98ee35ef7..8b729c278b64 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -199,6 +199,7 @@ static void cgroup_destroy_css_killed(struct cgroup *cgrp);
199static int cgroup_destroy_locked(struct cgroup *cgrp); 199static int cgroup_destroy_locked(struct cgroup *cgrp);
200static int cgroup_addrm_files(struct cgroup *cgrp, struct cftype cfts[], 200static int cgroup_addrm_files(struct cgroup *cgrp, struct cftype cfts[],
201 bool is_add); 201 bool is_add);
202static int cgroup_file_release(struct inode *inode, struct file *file);
202 203
203/** 204/**
204 * cgroup_css - obtain a cgroup's css for the specified subsystem 205 * cgroup_css - obtain a cgroup's css for the specified subsystem
@@ -2429,7 +2430,7 @@ static const struct file_operations cgroup_seqfile_operations = {
2429 .read = seq_read, 2430 .read = seq_read,
2430 .write = cgroup_file_write, 2431 .write = cgroup_file_write,
2431 .llseek = seq_lseek, 2432 .llseek = seq_lseek,
2432 .release = single_release, 2433 .release = cgroup_file_release,
2433}; 2434};
2434 2435
2435static int cgroup_file_open(struct inode *inode, struct file *file) 2436static int cgroup_file_open(struct inode *inode, struct file *file)
@@ -2490,6 +2491,8 @@ static int cgroup_file_release(struct inode *inode, struct file *file)
2490 ret = cft->release(inode, file); 2491 ret = cft->release(inode, file);
2491 if (css->ss) 2492 if (css->ss)
2492 css_put(css); 2493 css_put(css);
2494 if (file->f_op == &cgroup_seqfile_operations)
2495 single_release(inode, file);
2493 return ret; 2496 return ret;
2494} 2497}
2495 2498