]> git.baikalelectronics.ru Git - kernel.git/commit
vfs: fix reference leak in d_prune_aliases()
authorYan, Zheng <zyan@redhat.com>
Wed, 19 Nov 2014 07:50:34 +0000 (15:50 +0800)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 19 Nov 2014 18:07:20 +0000 (13:07 -0500)
commit9b0034201fde20348f02a585e5c14bc70353c8fd
tree1ed969cdba05031ff6410a14f32225744b351022
parent85fedecd54c56cbcb8e764f75bbbaacb1adb4828
vfs: fix reference leak in d_prune_aliases()

In "d_prune_alias(): just lock the parent and call __dentry_kill()" the old
dget + d_drop + dput has been replaced with lock_parent + __dentry_kill;
unfortunately, dput() does more than just killing dentry - it also drops the
reference to parent.  New variant leaks that reference and needs dput(parent)
after killing the child off.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/dcache.c