Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2909218iog; Mon, 27 Jun 2022 05:33:56 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vFIHqdJNTilYgi80VGEc3/kfDHLflb9PclO/e+Tg9sJgYVgTwtvE2eftcabJbr5DNNJlem X-Received: by 2002:a05:6402:2051:b0:435:71b5:b627 with SMTP id bc17-20020a056402205100b0043571b5b627mr16665351edb.267.1656333236383; Mon, 27 Jun 2022 05:33:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656333236; cv=none; d=google.com; s=arc-20160816; b=AMtEXurZHJWDMXG+dzMzOfIXIl6SOPkCrJR17/YW0xBYaxz6jN5YcdMVkoUAxC6w0+ vBCXaIDEI31p+DatFjx2gz40Cs5A6B5C37MyW5HpqPxHI5M1qtaP0QWmKLHeTkERmSpU o4y38RsN1U7L/Yqn2uJd70R9lz/6UJAV2LGoDQ5jtjbLyVZw5tx2rl7C1EMXQLkkKjf0 55nytTzoXlDnBUsDnt0Bm4tKxk7oPpkJDcNQGCgbKXTl/+y9aDr7hL39bywBFxK2fIYS Z50z8+BtXk89/nikNDBM++Lu7ozfqXoZ7LAHF5PiLCdeywK3Ztu3qziIR/v9ohkILqm/ ARGQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xjPXcIS0xqqm0ECcHMP8N6TEE5CIVZmAaCw8GjF1R8s=; b=ktQ/YJrN7U7Y08niRwbtfGlsxw2RbdlkiAvyFLKaGroau5CW5aBoQAMYcy35p9akp1 Dj+RzrLC17gJcM9yxeDxOktRKy8j7DIdHJb2VKVLwxsCEReYgSzua0Yz1+ZafbJ1/C+c MFPwIH2L/2sS7j+iGPMbcAcQkPBc7+X/w0/giaN87sb7oqiKKMGDuWTl3N9lR4om/zMi NUX3TvwzlLAEJxdlNplG0LjnVzx6y9Ju5a5TaYo5TUB1Ry5lMoZnLlvIpKB+nzEJWNll By7xWp9MaYl+KKJVGHG0JM3gLslhNGBf3fbUH+4nJvDDH1dx5Tjv35Xl5nhSbqLrI3lA LLkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2rDT4BlB; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dz14-20020a0564021d4e00b00437a1f3874asi1300699edb.448.2022.06.27.05.33.31; Mon, 27 Jun 2022 05:33:56 -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=@linuxfoundation.org header.s=korg header.b=2rDT4BlB; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239586AbiF0L5w (ORCPT + 99 others); Mon, 27 Jun 2022 07:57:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238404AbiF0LvA (ORCPT ); Mon, 27 Jun 2022 07:51:00 -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 7C6EF2655; Mon, 27 Jun 2022 04:44:03 -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 dfw.source.kernel.org (Postfix) with ESMTPS id F371361192; Mon, 27 Jun 2022 11:44:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01D9CC341C7; Mon, 27 Jun 2022 11:44:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656330242; bh=8GWOuV/TkliZCMmfzY6sCs4GDqU6Wk0+fQ/NyL1eARQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2rDT4BlBKgwLICsQGpEyX8h1WFzEbEkbyeAr5B9q3g+rW8ZpJ9Gqa/gCC85u1wIhC FiwB3k/L9szmYa/8mC9i9QAtqxjedZPz6UcljLZi9W0JafOyXQT0UaPez3udqoRTq3 0+7+2M5FErn9ITWl/Ar4sJY9MxyGYsBJHrdVE1xE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jaegeuk Kim Subject: [PATCH 5.18 129/181] f2fs: do not count ENOENT for error case Date: Mon, 27 Jun 2022 13:21:42 +0200 Message-Id: <20220627111948.431830642@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627111944.553492442@linuxfoundation.org> References: <20220627111944.553492442@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.5 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 From: Jaegeuk Kim commit 82c7863ed95d0914f02c7c8c011200a763bc6725 upstream. 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 Signed-off-by: Greg Kroah-Hartman --- fs/f2fs/node.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1454,7 +1454,9 @@ page_hit: 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); }