From patchwork Fri Sep 28 09:43:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yan, Zheng" X-Patchwork-Id: 10619225 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3B4D7180E for ; Fri, 28 Sep 2018 09:44:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FF8A2AB6C for ; Fri, 28 Sep 2018 09:44:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 21A4A2AD1E; Fri, 28 Sep 2018 09:44:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D21AD2AB6C for ; Fri, 28 Sep 2018 09:44:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729164AbeI1QG5 (ORCPT ); Fri, 28 Sep 2018 12:06:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47448 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729111AbeI1QG5 (ORCPT ); Fri, 28 Sep 2018 12:06:57 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8132F5D669 for ; Fri, 28 Sep 2018 09:44:02 +0000 (UTC) Received: from localhost.localdomain (ovpn-12-107.pek2.redhat.com [10.72.12.107]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7E2CC5E1C8; Fri, 28 Sep 2018 09:44:00 +0000 (UTC) From: "Yan, Zheng" To: ceph-devel@vger.kernel.org Cc: idryomov@redhat.com, jlayton@redhat.com, "Yan, Zheng" Subject: [PATCH 2/4] ceph: fix dentry leak in ceph_readdir_prepopulate Date: Fri, 28 Sep 2018 17:43:53 +0800 Message-Id: <20180928094355.6049-2-zyan@redhat.com> In-Reply-To: <20180928094355.6049-1-zyan@redhat.com> References: <20180928094355.6049-1-zyan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 28 Sep 2018 09:44:02 +0000 (UTC) Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: "Yan, Zheng" Reviewed-by: Jeff Layton --- fs/ceph/inode.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 375924b2bc86..a58e82a64545 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -1684,7 +1684,6 @@ int ceph_readdir_prepopulate(struct ceph_mds_request *req, if (IS_ERR(realdn)) { err = PTR_ERR(realdn); d_drop(dn); - dn = NULL; goto next_item; } dn = realdn;