Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 806C8C433FE for ; Tue, 1 Mar 2022 05:59:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230396AbiCAGAQ (ORCPT ); Tue, 1 Mar 2022 01:00:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229674AbiCAGAN (ORCPT ); Tue, 1 Mar 2022 01:00:13 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A5C9136312 for ; Mon, 28 Feb 2022 21:59:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646114371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=F9JX8WKpoPUQ9k6qNg1jTUckjujD77E0IdQDCj1wCmw=; b=h7CC9vXxO/uPoqEBTK235OFbrROHfubkHyG/5nx5mxqAQZ6nVbx9og/gGGBptrEA3C0KEe IMKpmui8qICYmKcuK08vbs2wikCoW3zm3JIzXa3Y/iZOhRe9Df//npiKI9XOmwuxHokIf/ +dlgjQnS/+Tah9fn5Onz7x6aQzOmufw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-186-tPl8PeuvOi6KUv__BVFSXg-1; Tue, 01 Mar 2022 00:59:30 -0500 X-MC-Unique: tPl8PeuvOi6KUv__BVFSXg-1 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 747B1824FA7; Tue, 1 Mar 2022 05:59:29 +0000 (UTC) Received: from fedora.redhat.com (ovpn-12-114.pek2.redhat.com [10.72.12.114]) by smtp.corp.redhat.com (Postfix) with ESMTP id B46CA794B4; Tue, 1 Mar 2022 05:59:26 +0000 (UTC) From: xiubli@redhat.com To: jlayton@kernel.org Cc: idryomov@gmail.com, vshankar@redhat.com, ceph-devel@vger.kernel.org, Xiubo Li Subject: [PATCH] ceph: fix memory leakage in ceph_readdir Date: Tue, 1 Mar 2022 13:59:15 +0800 Message-Id: <20220301055915.425624-1-xiubli@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org From: Xiubo Li Signed-off-by: Xiubo Li --- fs/ceph/dir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 0cf6afe283e9..6184cf123fa2 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -521,6 +521,7 @@ static int ceph_readdir(struct file *file, struct dir_context *ctx) ceph_present_ino(inode->i_sb, le64_to_cpu(rde->inode.in->ino)), le32_to_cpu(rde->inode.in->mode) >> 12)) { dout("filldir stopping us...\n"); + ceph_mdsc_put_request(dfi->last_readdir); return 0; } ctx->pos++; -- 2.31.1