|
@@ -199,6 +199,7 @@ static void cgroup_destroy_css_killed(struct cgroup *cgrp);
|
|
|
static int cgroup_destroy_locked(struct cgroup *cgrp);
|
|
|
static int cgroup_addrm_files(struct cgroup *cgrp, struct cftype cfts[],
|
|
|
bool is_add);
|
|
|
+static int cgroup_file_release(struct inode *inode, struct file *file);
|
|
|
|
|
|
/**
|
|
|
* cgroup_css - obtain a cgroup's css for the specified subsystem
|
|
@@ -2429,7 +2430,7 @@ static const struct file_operations cgroup_seqfile_operations = {
|
|
|
.read = seq_read,
|
|
|
.write = cgroup_file_write,
|
|
|
.llseek = seq_lseek,
|
|
|
- .release = single_release,
|
|
|
+ .release = cgroup_file_release,
|
|
|
};
|
|
|
|
|
|
static 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)
|
|
|
ret = cft->release(inode, file);
|
|
|
if (css->ss)
|
|
|
css_put(css);
|
|
|
+ if (file->f_op == &cgroup_seqfile_operations)
|
|
|
+ single_release(inode, file);
|
|
|
return ret;
|
|
|
}
|
|
|
|