Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1655350iog; Sat, 18 Jun 2022 16:17:13 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tIaF8FJrfmc/D3FWWHHzstR7T5I/USyo65/k01SQy1ms6F0yYfYg8f11AgTdp6wIanjxvn X-Received: by 2002:a17:906:5d08:b0:6ff:8ed:db63 with SMTP id g8-20020a1709065d0800b006ff08eddb63mr14716420ejt.408.1655594233140; Sat, 18 Jun 2022 16:17:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655594233; cv=none; d=google.com; s=arc-20160816; b=RU9d52rVfhOMPyTRyDNyG6EHlnE8mMnljB601b/EuOWXbLMvUrevZyjDbGI8hx3E88 3+6NAyr36HyKT7cLORc5bIPrXtQkx/A6HDb7lu5L03kDaMszaDGReeKBS/AilxsK5utI WJ2LjzI8ihnb1emGWVq5vd5SWDkwaIXF9X7M9F1BWWP7NJGvA00KNR+pY6VgSoRcNV1U knNnAp2ZEnJJQqa3GgR2nEPTXCkudcKLx8VwwtTzoZGgjUGeWCazzQYhjJtNmCezxg/7 qvf0piB/wy/cI9BEnlKJkAQ5CLXwHmnaKQHZ7dubFTZ8bcI27R02WjcwV8o0FY8ypLAD 1JSg== 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=ADJj4uPeh8NPNr6TJh2107as2KfTTMkqG+G41+Lb5mA=; b=L78IFza6RyKqZBQU2CvCTujMeI0j2hZYFkBV9ylJd9qHV+88J4goBb6CuS56JMSYot UMxhHCiv7S4c7U0NYMD4lddW3jny5gsnsYf2NPsDTbq7I5tXEYqvw0Fqd9A/VwW8KbAP XkZuQI3BBNbN6d7lH5hrmhOjtAshjtTJ0E2ICmgf708OlpZRgrVHWJKT8yXs428VnkqV TTMWsPot/zc8xPCLrGzqxR0YEnEklGelFxOVnxUS9EZR26tKjeCqZBFbKK8CzsY0FXK7 O/t7R6zImk2rkikuhNptQbsTkZjuXTxghELNc/xgh/DV4Ac2s1AGXvZfZuVy1/cGnH0K O9BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=F29zOKh+; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m1-20020a170906160100b00708884b555asi7992949ejd.392.2022.06.18.16.16.46; Sat, 18 Jun 2022 16:17:13 -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=F29zOKh+; 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 S232535AbiFRWqQ (ORCPT + 99 others); Sat, 18 Jun 2022 18:46:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbiFRWqP (ORCPT ); Sat, 18 Jun 2022 18:46:15 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5424BC31; Sat, 18 Jun 2022 15:46:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id F10A1CE0861; Sat, 18 Jun 2022 22:46:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21A14C3411A; Sat, 18 Jun 2022 22:46:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655592369; bh=V7chkL2A5m6qQLgPvjeycpUuzNA+cLG9L2qrqHYLUSg=; h=From:To:Cc:Subject:Date:From; b=F29zOKh+AdueVTj4VXMYrX/smopNogx5c75t0KuMKQ1eaBz2c5o0eD+vjXtb9XN2j VKlbYcFrjCrt0+ML7E8sRmaflzz27K1dWapfGzQhzLwIVbt4tWiXFUuCPBz3RniR9Q ySQu2lNEEwlut7osVxn7csDmMLqZa1gKsjalUC6WPvKHWVv3F2W+YHjIocuf5gPmJl UVwmWG8Q5Y2iOzTqRAwNsB/K5claNV7Rk1TnLjwO0ORYhoRrR/5aX20lds/zcIUDXd D1XECy9bF4vihzSxa4QSzLerg7NFbHcCqxZN2TtaNSP1/2g92FXIP1Uu2FO4r13IbC Og7SnABFnTDFg== From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim , stable@vger.kernel.org Subject: [PATCH] f2fs: do not count ENOENT for error case Date: Sat, 18 Jun 2022 15:46:06 -0700 Message-Id: <20220618224606.1554706-1-jaegeuk@kernel.org> X-Mailer: git-send-email 2.36.1.476.g0c4daa206d-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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: X-Mailing-List: linux-kernel@vger.kernel.org Otherwise, we can get a wrong cp_error mark. Cc: Fixes: a7b8618aa2f0 ("f2fs: avoid infinite loop to flush node pages") Signed-off-by: Jaegeuk Kim --- fs/f2fs/node.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 4181d03a7ef7..095a634436e3 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1450,7 +1450,9 @@ static struct page *__get_node_page(struct f2fs_sb_info *sbi, pgoff_t nid, out_err: ClearPageUptodate(page); out_put_err: - f2fs_handle_page_eio(sbi, page->index, NODE); + /* ENOENT comes from read_node_page which is not an error. */ + if (err != -ENOENT) + f2fs_handle_page_eio(sbi, page->index, NODE); f2fs_put_page(page, 1); return ERR_PTR(err); } -- 2.36.1.476.g0c4daa206d-goog