Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp4507029rwe; Mon, 17 Apr 2023 13:53:16 -0700 (PDT) X-Google-Smtp-Source: AKy350bT2hcZLojHWDpbCSvAMO22HCxLaVYi5uN2KRacaa6TJG/+348yLEyEUMBzh6PQCgqY4sw7 X-Received: by 2002:a05:6a00:240a:b0:639:435:1373 with SMTP id z10-20020a056a00240a00b0063904351373mr21851526pfh.10.1681764795285; Mon, 17 Apr 2023 13:53:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681764795; cv=none; d=google.com; s=arc-20160816; b=Uf4kly285KecwL1S1/9b0WLpEUlxdrsLHrs1NDehKTfi4jPKHvwDOA4meSXhb+N53o u7h61iKYntIPVn/Dy0BfImrwpsVWABPSajtL8gL8JoxnSOiWav85zxOgQBFZJ+g6IyEf ar3sn603JpW0cIFQxYjZdPJ107taPRLqbgUnVoYHm04hLTAfuFeL9jfSPjYHNHrqaCSH 6hdPjHEkLeNolDN9+NmSyzAa8RYwvxvbRRTXmwOJvkWSt9SGJYSU45W2HTQWc/mYQSz1 JjpEMfa+RRJ3mh49jQIj74MHvc6rWHj8pnxEe82JyxcxocSMz4vVqc8vVqEXVHNzSCRz OuvA== 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=+WMJEZfT4Ys0KbwwujZL+IDwoeH9cl1f3Tq+Kx4YCfw=; b=A6Fl+UOmCAWeoQlaVrflhFoIeM+VPig4LcEhIMgauMOeszy/CC5NPdHTfXk0zRcEQk KQdcZp7/zI6RAiEMh229Iim1F6t9RpHYQbzAkIPG/wl47xpNh1Ph9OloN+yyrk0Hf5yF SpuG1vxrMB1p7uUBioOdbXLv9pSoX0rO2VMHKaBNsfndO4nl5hT1XWcF2zHiHYXl5wpZ oav1lL6qM/eildL7+/wNjbwLEvH6RfKqEONLEeLBHLEJbh0tTUxP3/XYt1ZJemH/mI7n Qo2rBSrUkdJwUqmJoEJ7p037bnPfo+fiLs7Cy8LUDYT97U4ZxC4exZxKDSbDi0bx1XL5 3wOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@orange.fr header.s=t20230301 header.b=WBPHdQE9; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q23-20020aa79617000000b0063ae78d57f7si12397369pfg.69.2023.04.17.13.53.03; Mon, 17 Apr 2023 13:53:15 -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=@orange.fr header.s=t20230301 header.b=WBPHdQE9; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230330AbjDQUwA (ORCPT + 99 others); Mon, 17 Apr 2023 16:52:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230336AbjDQUv5 (ORCPT ); Mon, 17 Apr 2023 16:51:57 -0400 Received: from smtp.smtpout.orange.fr (smtp-18.smtpout.orange.fr [80.12.242.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B3AB525B for ; Mon, 17 Apr 2023 13:51:50 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id oVpEphQ3ExZmMoVpEpeIvB; Mon, 17 Apr 2023 22:51:48 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr; s=t20230301; t=1681764708; bh=+WMJEZfT4Ys0KbwwujZL+IDwoeH9cl1f3Tq+Kx4YCfw=; h=From:To:Cc:Subject:Date; b=WBPHdQE97FnrU3THe4rGoRLKR4JHK/Y5ILwItWtgz+4CItd5B2ajxtyUpjmuMsadm OIBLe18VtBypBBIJTwCfVI17B3bWEoRX/EabCkIP1PIAmGXJzddsL2ygaJX7NxCg5P kbuFyvrAwmcaUgC8RBPQ3SHfOcJ+3AHhCoGRn6wqVwf2ePJEq+WwlX4TT0eCjns9WW J1xcHPyx0j4Jh3NLHA7K900dtaGr4yga7NXKh5bIzuGM4qhhqy8vM7pgBEtxhUtpfB PKtXc1kLhtlbyB1AnUOykeKQuBDkB/moakVNYmxGc8vV+NrkRpUbPxspxJ8RSdYLKO exQjeJs1mre4w== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 17 Apr 2023 22:51:48 +0200 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Jaegeuk Kim , Chao Yu Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-f2fs-devel@lists.sourceforge.net Subject: [PATCH] f2fs: remove some dead code Date: Mon, 17 Apr 2023 22:51:46 +0200 Message-Id: <523ec4b037d064e92e19203e3ab9a161e3d9aa71.1681764681.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,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 'ret' is known to be 0 at the point. So these lines of code should just be removed. Signed-off-by: Christophe JAILLET --- The dead code became after commit 8358014d6be8 ("f2fs: avoid to check PG_error flag") --- fs/f2fs/node.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index bd1dad523796..e7bc87177e18 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -2063,7 +2063,7 @@ int f2fs_wait_on_node_pages_writeback(struct f2fs_sb_info *sbi, struct list_head *head = &sbi->fsync_node_list; unsigned long flags; unsigned int cur_seq_id = 0; - int ret2, ret = 0; + int ret; while (seq_id && cur_seq_id < seq_id) { spin_lock_irqsave(&sbi->fsync_node_lock, flags); @@ -2084,14 +2084,9 @@ int f2fs_wait_on_node_pages_writeback(struct f2fs_sb_info *sbi, f2fs_wait_on_page_writeback(page, NODE, true, false); put_page(page); - - if (ret) - break; } - ret2 = filemap_check_errors(NODE_MAPPING(sbi)); - if (!ret) - ret = ret2; + ret = filemap_check_errors(NODE_MAPPING(sbi)); return ret; } -- 2.34.1