ceph: fix dentry leak in ceph_readdir_prepopulate
authorYan, Zheng <zyan@redhat.com>
Fri, 28 Sep 2018 01:10:29 +0000 (09:10 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 Dec 2019 08:13:44 +0000 (09:13 +0100)
[ Upstream commit c58f450bd61511d897efc2ea472c69630635b557 ]

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ceph/inode.c

index 3818027c12f5a10d85a3e69bdac5f18ef57dce45..5999d806de78813f9120cac1dc1e323ca60849a2 100644 (file)
@@ -1631,7 +1631,6 @@ retry_lookup:
                        if (IS_ERR(realdn)) {
                                err = PTR_ERR(realdn);
                                d_drop(dn);
-                               dn = NULL;
                                goto next_item;
                        }
                        dn = realdn;