Message ID | 20230629014102.3057853-1-chao@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp9334484vqr; Wed, 28 Jun 2023 19:00:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6oANebsovrvkkdA9ttc018kpuV/XA+PJcR/qc8Wjps+yxiFjFYzdjfWprluoJGq1xsoVDi X-Received: by 2002:a05:6a20:549c:b0:125:5f1d:9dbe with SMTP id i28-20020a056a20549c00b001255f1d9dbemr1534536pzk.2.1688004037920; Wed, 28 Jun 2023 19:00:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688004037; cv=none; d=google.com; s=arc-20160816; b=JYkpeaBEz4eJKLT7gm6Ake6abEMv7M31moLiMnMftVA+0UQ27v3/pprFOMmVM4CqHt utkmOZkfexVwtJyRaEOXFTJkvRNIJgXRXzqrlNDJO6hEYLW42vUoIWpkD/e3W5DmNE+B P73qtiFkw/MVTNUVZhnYXgmGTS4agvMBA33cYPTR8Ekvb130/gqQVT5OZp3R8TLvmW9c rUbbPWhb7g1HfZwokPpX2yw3suC87huw09bNVE8dXFE3mKAP47wbaOP0o8hNlfI8YXvc llSzuQdynPaRRvdYdG7HMvqKf91JCopvpxJyedz+guhYUqXwet7+mQGEgoMZZ1OBPh4D YB2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=6z6xRoLXvC1J0NbhQA5qJ0d/xmpsuSMjwG5GpXsMwz8=; fh=X1/oBJvTGJUQ0YtRp03u+3tPfRw/dXXALWynfOSlfQQ=; b=FExqc5FcjQ4QEk+sK5MhWCby+yWuRWuyOkWbhUouatBe+LhSQtZAEBY48EjZLJVppa NHbKZ27sviZRr/aBfXjkLmoUeyyyxl0q1Nz9InvibzWFcY//6cXrpHFzvp0FMnQJ00W9 blySYDoa7ajDvYsNPYo8uhkFQ7PQ/84vAg0EAJgbRWO9Ac8AmMgndxIzVm/EXBYy4pgS 4YjMiklPnhzb2UwPibOvZhTeBwbTBn+bNd5IsH9tuWKWxdZyy/bp9wC+9FmglVXz/f1R PholJYYbCeLhe9rOA0Z2geU18jcMoM3Mp8zlFzCOACbYgFg5PBkKpR+xVdoSz1GXog9T d3RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=je+daSnV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r25-20020a6560d9000000b0053f0bfcd4fasi10146110pgv.173.2023.06.28.19.00.26; Wed, 28 Jun 2023 19:00:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=je+daSnV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231330AbjF2BlP (ORCPT <rfc822;ivan.orlov0322@gmail.com> + 99 others); Wed, 28 Jun 2023 21:41:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229487AbjF2BlM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 28 Jun 2023 21:41:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2044C199B for <linux-kernel@vger.kernel.org>; Wed, 28 Jun 2023 18:41:11 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A3E7C614B3 for <linux-kernel@vger.kernel.org>; Thu, 29 Jun 2023 01:41:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CEFD6C433C0; Thu, 29 Jun 2023 01:41:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688002870; bh=IRiMTzPSBBDNyJP17NyLwGG1gecMwGYnqIEp9NdQdYc=; h=From:To:Cc:Subject:Date:From; b=je+daSnVyZAyW2Pk9dbcmPDrLMWrJwD6yiv0OOTNVgVFbc8b+qCmG5kCO7id/jBm9 GL39Ofu40OM7Z7v+cQnebYB8nzzaDUWCuFPi33MbQbXZioTu0Hn48Wl5V9jHu/+fTL gBUQQoClCyI+P3wXsXDrKTH9tAwd1U1PSQzYp1EHI7z0ZLShqrsLkKxe38VhEsl7b2 4PGpRs9NTeVCiwYhdVAAiZ8JgMCHzPkRlAqhnCzxdL1+gfHcV0Ic90J9D/sCsA12Zt ADl86kY3nchQNs5TTcWJE7OpMQdB6qFkbZrFSErEkiKCG+Us9ud2UeQcJuc2SGNY3o TmgyiB3Us0HRg== From: Chao Yu <chao@kernel.org> To: jaegeuk@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Chao Yu <chao@kernel.org> Subject: [PATCH] f2fs: fix error path handling in truncate_dnode() Date: Thu, 29 Jun 2023 09:41:02 +0800 Message-Id: <20230629014102.3057853-1-chao@kernel.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770000522275833051?= X-GMAIL-MSGID: =?utf-8?q?1770000522275833051?= |
Series |
f2fs: fix error path handling in truncate_dnode()
|
|
Commit Message
Chao Yu
June 29, 2023, 1:41 a.m. UTC
If truncate_node() fails in truncate_dnode(), it missed to call
f2fs_put_page(), fix it.
Fixes: 7735730d39d7 ("f2fs: fix to propagate error from __get_meta_page()")
Signed-off-by: Chao Yu <chao@kernel.org>
---
fs/f2fs/node.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim <jaegeuk@kernel.org>: On Thu, 29 Jun 2023 09:41:02 +0800 you wrote: > If truncate_node() fails in truncate_dnode(), it missed to call > f2fs_put_page(), fix it. > > Fixes: 7735730d39d7 ("f2fs: fix to propagate error from __get_meta_page()") > Signed-off-by: Chao Yu <chao@kernel.org> > --- > fs/f2fs/node.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Here is the summary with links: - [f2fs-dev] f2fs: fix error path handling in truncate_dnode() https://git.kernel.org/jaegeuk/f2fs/c/0135c482fa97 You are awesome, thank you!
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 4a105a0cd794..dadea6b01888 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -943,8 +943,10 @@ static int truncate_dnode(struct dnode_of_data *dn) dn->ofs_in_node = 0; f2fs_truncate_data_blocks(dn); err = truncate_node(dn); - if (err) + if (err) { + f2fs_put_page(page, 1); return err; + } return 1; }