fuse: readdirplus: fix dentry leak
commit53ce9a3364de0723b27d861de93bfc882f7db050
authorNiels de Vos <ndevos@redhat.com>
Wed, 17 Jul 2013 12:53:53 +0000 (17 14:53 +0200)
committerMiklos Szeredi <mszeredi@suse.cz>
Wed, 17 Jul 2013 12:53:53 +0000 (17 14:53 +0200)
tree0e8d69c9544fd3c55d9c8bf198485abd07e26f1a
parentad81f0545ef01ea651886dddac4bef6cec930092
fuse: readdirplus: fix dentry leak

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>
CC: stable@vger.kernel.org
fs/fuse/dir.c