Skip to content

Commit

Permalink
cgroup: cgroup_rm_files() was calling simple_unlink() with the wrong …
Browse files Browse the repository at this point in the history
…inode

While refactoring cgroup file removal path, 05ef1d7 "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 <[email protected]>
Reported-by: Al Viro <[email protected]>
Acked-by: Li Zefan <[email protected]>
Cc: [email protected]
  • Loading branch information
htejun committed Jul 9, 2012
1 parent 496f131 commit ce27e31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit ce27e31

Please sign in to comment.