提交 ce27e317 编写于 作者: T Tejun Heo

cgroup: cgroup_rm_files() was calling simple_unlink() with the wrong inode

While refactoring cgroup file removal path, 05ef1d7c "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: NTejun Heo <tj@kernel.org>
Reported-by: NAl Viro <viro@ZenIV.linux.org.uk>
Acked-by: NLi Zefan <lizefan@huawei.com>
Cc: stable@vger.kernel.org
上级 496f1314
......@@ -959,7 +959,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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册