From patchwork Mon Apr 17 20:51:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 84458 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2395009vqo; Mon, 17 Apr 2023 13:53:33 -0700 (PDT) X-Google-Smtp-Source: AKy350Zi/Gl0Jf6jrwcL6E5Y0Iomwr5Fju0Q8X3Fe00SgJbT9c3JooE7ZoWVav85xKXz1s/u5N0o X-Received: by 2002:a05:6a20:279d:b0:d9:bf06:cd85 with SMTP id s29-20020a056a20279d00b000d9bf06cd85mr14847229pzf.25.1681764812756; Mon, 17 Apr 2023 13:53:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681764812; cv=none; d=google.com; s=arc-20160816; b=Uq2VE9sEbVGLREY4IUlHw3ezz3OTFmmgOnNkVJekajfuQ6BfcSZBd97rC1JftqzEGK +UJm85veN2yiQHGAcaTlSUa8IHxkW/LEh/Fa1y/M2jmG/0BOvwFu5fvgkyu/IQ0wMKW0 HWE/xvcIZZRVMut6MdMn43Pooq7VeinghUZKlQ4qrdXaF4sSmdBlNEnaUHW4+mJ17ZoJ Bz1EI4lYzACDAxggOh0aJQBbcXEKBOAzOuAKpguSotqPeWnrty2fxXaQ8oCFj5X73rZT hMqdM0JyNdnEXRm8mMViKmgH1c05Iw+u6QBXdIg8Vt9oHgzmnGCHG7XT8hsw81ZaXKid MCtQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s8-20020a655848000000b00513579041bfsi12640425pgr.636.2023.04.17.13.53.17; Mon, 17 Apr 2023 13:53:32 -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 S230338AbjDQUwA (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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763458219967660263?= X-GMAIL-MSGID: =?utf-8?q?1763458219967660263?= 'ret' is known to be 0 at the point. So these lines of code should just be removed. Signed-off-by: Christophe JAILLET Reviewed-by: Chao Yu --- 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; }