mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-02 09:16:41 +09:00
cgroup: cgroup_rm_files() was calling simple_unlink() with the wrong inode
commitce27e317baupstream. 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
05e4b43a37
commit
ffa6a04184
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user