fuse: readdirplus: fix dentry leak
authorNiels de Vos <ndevos@redhat.com>
Wed, 17 Jul 2013 12:53:53 +0000 (14:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Jul 2013 23:30:07 +0000 (16:30 -0700)
commit05ac7b3a7db7823aecde55df6a5f8d6bb45693f4
treed141871c29e281efcca627976892f3210162b2fd
parentdf18f5f93ce9ed27bd9a779196614afd7a0aa017
fuse: readdirplus: fix dentry leak

commit 53ce9a3364de0723b27d861de93bfc882f7db050 upstream.

In case d_lookup() returns a dentry with d_inode == NULL, the dentry is not
returned with dput(). This results in triggering a BUG() in
shrink_dcache_for_umount_subtree():

  BUG: Dentry ...{i=0,n=...} still in use (1) [unmount of fuse fuse]

[SzM: need to d_drop() as well]

Reported-by: Justin Clift <jclift@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Tested-by: Brian Foster <bfoster@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/fuse/dir.c