From: Tejun Heo Date: Tue, 3 Jul 2012 17:38:06 +0000 (-0700) Subject: cgroup: cgroup_rm_files() was calling simple_unlink() with the wrong inode X-Git-Tag: v3.5.1~64 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ffa6a041840728be548e45243ccf37303f68a8e9;p=karo-tx-linux.git cgroup: cgroup_rm_files() was calling simple_unlink() with the wrong inode commit ce27e317ba22b359bde02216afab934dac3af095 upstream. 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 Reported-by: Al Viro Acked-by: Li Zefan Signed-off-by: Greg Kroah-Hartman --- diff --git a/kernel/cgroup.c b/kernel/cgroup.c index b303dfc7dce0..15462a01f3e1 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -954,7 +954,7 @@ static int cgroup_rm_file(struct cgroup *cgrp, const struct cftype *cft) dget(d); d_delete(d); - simple_unlink(d->d_inode, d); + simple_unlink(cgrp->dentry->d_inode, d); list_del_init(&cfe->node); dput(d);