]> git.karo-electronics.de Git - karo-tx-linux.git/commit
cgroup: cgroup_rm_files() was calling simple_unlink() with the wrong inode
authorTejun Heo <tj@kernel.org>
Tue, 3 Jul 2012 17:38:06 +0000 (10:38 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Aug 2012 15:22:53 +0000 (08:22 -0700)
commitffa6a041840728be548e45243ccf37303f68a8e9
tree27ec8578c68621866e2ba03abdae7f98a7b873cd
parent05e4b43a37ef048498d4b326d9014923de4d4cd1
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 <tj@kernel.org>
Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Acked-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/cgroup.c