aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-07-03 13:38:06 -0400
committerTejun Heo <tj@kernel.org>2012-07-09 13:11:14 -0400
commitce27e317ba22b359bde02216afab934dac3af095 (patch)
tree3f301645162ea464d13f6653b3271445f6045d3f /kernel
parent496f1314f9cac3b59016b5af71ddf47e7a4eb2fb (diff)
cgroup: cgroup_rm_files() was calling simple_unlink() with the wrong inode
While refactoring cgroup file removal path, 05ef1d7c4a "cgroup: introduce struct cfent" incorrectly changed the @dir argument of simple_unlink() to the inode of the file being deleted instead of that of the containing directory. The effect of this bug is minor - ctime and mtime of the parent weren't properly updated on file deletion. Fix it by using @cgrp->dentry->d_inode instead. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Al Viro <viro@ZenIV.linux.org.uk> Acked-by: Li Zefan <lizefan@huawei.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'kernel')
-rw-r--r--kernel/cgroup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index dec62f5936ef..a56805aa0f1b 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -959,7 +959,7 @@ static int cgroup_rm_file(struct cgroup *cgrp, const struct cftype *cft)
959 959
960 dget(d); 960 dget(d);
961 d_delete(d); 961 d_delete(d);
962 simple_unlink(d->d_inode, d); 962 simple_unlink(cgrp->dentry->d_inode, d);
963 list_del_init(&cfe->node); 963 list_del_init(&cfe->node);
964 dput(d); 964 dput(d);
965 965