Message ID | 20230425192448.35767-1-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3624153vqo; Tue, 25 Apr 2023 12:28:31 -0700 (PDT) X-Google-Smtp-Source: AKy350YX9a8v+JbjDoQQuPR+g2yum2cMxFfIWLTt4/Pv/39b64CwAUI5pJj/wHqotfXA9CWSeHIn X-Received: by 2002:a05:6a20:1596:b0:f2:9d49:5236 with SMTP id h22-20020a056a20159600b000f29d495236mr18316684pzj.20.1682450911131; Tue, 25 Apr 2023 12:28:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1682450911; cv=pass; d=google.com; s=arc-20160816; b=eKR16rEoRodojfyEpq1dBLJlZm3VJ1blXGb/Ewn9nyBq54pK46bn2V9xbBR+K/nw6I bSAJkzXh6vdw0oxuk9eHaQdrp9MOakTQ0tG8zBzxKrbFHyT/OsGYpQi2TiXwG87bfyR6 cH09ozzqFVAKsZEu1cOTYdbPv993Mb6UtTtSVlgkB7Ab6ZHro458JORGNQ//h5JLiRQH xG/n60PycQHkbjJNSlAEFAI59vWWnHt3+InftzpGzASMBmuNHu7KqtOSAzSgJqNmmf9U PTn0PROpu/mIdjdVl/6q79ERGHdwefwdQmrbFr0yA0RJPFn4Di2ub0y5W45mK7XMCVdg ja+A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=0tFjCdDMpDFTQ/GKv3N1dIyCZwdtsJDHja/J46tCzrU=; b=h7wPGlWajcY4PH78bmF8gLc97CyHmCJ5pC3qDp4ktRBdoRduX7h+sgGa/AoRK+YckL CEK4z2UYsP4dwFxqmwNf8US+6eR5P1wIPs0RTBgNwXXN6q8GuZi1zwVwaVzVN15iDOqx XKdvVrwvySGLNnd2CUj827a5c6ADbm+SljFxmc/5QcXA9tIIr+zVDbMDZm90lVlneA14 M96xkDuP0SZMIOHDuJZlsJQLZHbuvYvVoFwAwc1FsdVIcopI9fS6dAC0An+ZRukPMN5w VLp1vWb8XGkljjDAVm3xAmUDfli3jMIt++xc8RO+pgSM5nA6C8DpYogfQcgc72yIaGy8 532Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=YSyGii+O; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z9-20020aa79489000000b0063b8a37e41fsi14567806pfk.206.2023.04.25.12.28.18; Tue, 25 Apr 2023 12:28:31 -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=@vivo.com header.s=selector2 header.b=YSyGii+O; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235001AbjDYTZ0 (ORCPT <rfc822;zxc52fgh@gmail.com> + 99 others); Tue, 25 Apr 2023 15:25:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235227AbjDYTZR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 25 Apr 2023 15:25:17 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2098.outbound.protection.outlook.com [40.107.215.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04B7B18BAA for <linux-kernel@vger.kernel.org>; Tue, 25 Apr 2023 12:25:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RE/Nmdv8d6/BW+3A3NtWIs1BllLynZ2kUbJm64zkSKMVT5Hsg+qFYpx8+4Gi70bwk6/A5OiZytS44fT31QiPEEuBhFHMcIOuFRAPbN573Tz/YeAmKTDJY4t2HmcHuvMwcF6np+1j68ngf4+89P4IT2DsassPdNI5aGnRHe8bEmvK6dQRx9jLxDt8Mn2Ch/7FYRgXrcLmw0QX97LBtC8oJHZci7LBbHQB6TJz7HquNRNz64xHkjlB8ywVNgeTI6IN1fMW6KqA4/l4P0ummYgyrjOJXkVGKTa468hgr869IgmC1VzenMCsyvnN2l8Cm4PlUYxx1k5YDYLD/O2q0ZGLfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0tFjCdDMpDFTQ/GKv3N1dIyCZwdtsJDHja/J46tCzrU=; b=D+t8AEefEsHuT1bO4S1ncz5Yfiawtqn3aE+ShLkdT7LN4J32rZ/ZrA8GPD4EVwZ2rOmsz84TfoBnm2OiSwXy5UbcdWmA0FcArHCcD2n7tx7E35g4dEzudTNWumG73T+B1vQwu954iXxKu+o/SpMPePM46ansXadTqLIzvT+645j1bZMua3bb2+5fKcboQnDC99kCayeEJ4rzmxIRy8zNKv2vg2yG6lFBnSAQyAFKK2amLAkAMn6JMjJ3ppG7G7UDR40vx98lwEvno3FrbMY2un+waC5ea3YQdXMwlJjJTKloCVi1v3w6MZS5VTw1PEw1XCLkRqhSQcx1DaNTfMDcWg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0tFjCdDMpDFTQ/GKv3N1dIyCZwdtsJDHja/J46tCzrU=; b=YSyGii+OJzjxVcb1s/KJyV+g2ERVXyzl/78vP8xAAi7+f0deGXk+sTSV6+F0vP0cZg5HDBhHGe7y2JT+Qo04evuB6oMfs0o6imVqrLY1ndENZsZUArEewpaYj1kRCfaqxEvhP1BDPcPq+Szhv8hYdfhhmcNWKHcsNnq0o9xcnCjgTmWpDyytBeY6IeZmcMpw19NMw9YBhRQRZ1oAmv8LTb2DrsbRUzvAGELzajk+3MDZlMwmWwQqpd2o6uQHUSvsv67ati9TaHXqWAJ3iE6jnEFIMyUMYlNbHK/xm5jnzN726QHek7uVCHn42LvQpNN/o0lwFtZ/xRtsQP8OU32/2A== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by TYZPR06MB4048.apcprd06.prod.outlook.com (2603:1096:400:22::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.33; Tue, 25 Apr 2023 19:25:00 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::76d6:4828:7e80:2965]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::76d6:4828:7e80:2965%7]) with mapi id 15.20.6319.033; Tue, 25 Apr 2023 19:24:59 +0000 From: Yangtao Li <frank.li@vivo.com> To: Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org> Cc: Yangtao Li <frank.li@vivo.com>, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH] f2fs: simplify the processing logic of retry_cnt Date: Wed, 26 Apr 2023 03:24:48 +0800 Message-Id: <20230425192448.35767-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR01CA0026.apcprd01.prod.exchangelabs.com (2603:1096:4:192::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB4048:EE_ X-MS-Office365-Filtering-Correlation-Id: e1bf3b41-dcd1-4f87-59f1-08db45c2c21c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mDmv/zH1wmxPwF2TFCxjwbtb+va8R2El/PCzN7Qwy0jPdCxB41+qJBxabNchu9jJZfFavirQVW6Kjmi0RTvPc5lXQARGVrJEi3w1JH/UwNT9S3xg9fDGhHKqU7LXo0BFK/cZZSlCfPih2NgwDja8Fu9gWQ4b+amLEN62Kgek3QeNQTDMtpz+lV8K92I4F9XIh23NrIwVLkVLiRjMg4acOipHMDexIQuPnGhE6xD9prQMNV4YG71TXJQmAPeDO85rTesTnat3OmmsN709y6ETkzOg7IX8TFkuPzSJHMmgQUlH13zlj0tiLzHhqNLLjWcmTKptyhzFVJ/F5zEbmXB9xUO97IyHICq7YmrgdiCn04w98hrZHSctKy5WAwIA5PbMPCM1fUkRZkqO5ImC3CY3N5PkronVJp71zBzZgMYsZ5ocEAMAgyXDynZ8JcBnWggzMsShTHcNqDfmGdO9Hm5VOdFWxEBffq+JgIzSzCyw9U6iiN0WouVkzcayk0y+v65OVjn9OzM2HKoNUAnXrPo8/CtumnMEXUVxyZcxpDCQFNr+NpPzYjA+PXgWATZQyNxv79cRXw524FjsCbVvCNs5jZ72u3r14y5Ki8E2lRynkli517kTIGOF4zOgn6P8YVRI X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(376002)(136003)(346002)(366004)(39860400002)(451199021)(478600001)(38350700002)(38100700002)(52116002)(6666004)(6486002)(6512007)(26005)(186003)(1076003)(110136005)(83380400001)(6506007)(2616005)(5660300002)(8936002)(8676002)(41300700001)(4744005)(2906002)(316002)(4326008)(66556008)(66476007)(66946007)(86362001)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /N38AohhIiZgfryyl5Jfh1c5wO4/5R6G91tQyIZHnuk94tK4W4UZNCyvTKKM61jXibpIijT1m2KBLeV7ZuAJegFCqVyorI/Tbv3ELfF7hP2LCn/t94a63jta3BlZb1z8O5ApOJAuXhHHGBe+hT/o4TePKMTLpZ5NltJC9V1gkWv/yHjk1Xa+0P+5TL7gY7D+Lu5vS8+QcAFRUSzBKzhZFNEZexVm1viXL21ZUsQDUl10iEhqcpzmirbvNfvm3ukQeJ4rx55KrA6Bs7eg4n0u96Nr/g1ZxAJZJmNp4t2P6XnmtEBZEPlIS5VyMm1rumeIk3z72Vdx+zGYL0AmXzXjVkT79Zfgx+Vq579CpAri+MBVpeAjVgzq4HsQA7m7VanUSa12szw+11uxFmt3pxQj3bMUc3UMZha1Dgs0kiAy7Yt/XlUoFVISfKN8TRmDAlazCbvlp2izxUdKwJjbOj7GjVPCGgSIOq10D6/1HAMNBNc9JtZ83awTqDSAGgcBwiMjUhGQvXqkRpe+MBX0asUaQTe2z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Exchange-CrossTenant-Network-Message-Id: e1bf3b41-dcd1-4f87-59f1-08db45c2c21c X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2023 19:24:58.8179 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: KwJvUT7gNFWkq7dfVDENyvN6OHRH1mTnh9CX/K3RVnvLPGgxFMmhwaZjmrbAsB2Wd+Z56aTlhRpk0FeXoSSfbQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB4048 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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?1764177646213688668?= X-GMAIL-MSGID: =?utf-8?q?1764177646213688668?= |
Series |
f2fs: simplify the processing logic of retry_cnt
|
|
Commit Message
李扬韬
April 25, 2023, 7:24 p.m. UTC
Replace
if (a > 0) {
a--;
}
with:
if (a-- > 0) {
}
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
fs/f2fs/super.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 107585797ffa..cbab0cc2c82e 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -4769,8 +4769,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) kfree(sbi); /* give only one another chance */ - if (retry_cnt > 0 && skip_recovery) { - retry_cnt--; + if (skip_recovery && retry_cnt-- > 0) { shrink_dcache_sb(sb); goto try_onemore; }