Message ID | 20230320173137.64413-1-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp1359650wrt; Mon, 20 Mar 2023 11:10:48 -0700 (PDT) X-Google-Smtp-Source: AK7set+fB3tk3mH8A4lO/9o+afynLo0ggK/CCX7xJaQ92yc0FhP1KykaGwu041JYKVVSCWn/mbuJ X-Received: by 2002:a05:6a20:3a91:b0:d8:ea91:262a with SMTP id d17-20020a056a203a9100b000d8ea91262amr6940545pzh.9.1679335848308; Mon, 20 Mar 2023 11:10:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679335848; cv=pass; d=google.com; s=arc-20160816; b=O5BLX6cgvhOzz3J/tK1SpRj+ugyE4+MyND5zgsHPl87XmpLQoeX0Tw7C4gC+OLaCMH njENZwPAi/EHXerNw3MtWNYg384BjZT5M+59yH/6sYsOmaoX8Cf3aLPmoH1jN3pLagMF jrFoHUEDkXdtU0ZJZUr3QpOkwQ5Y7ifYnaCH9jGmlt1lfhgEzAW4lyVNimLpnl7rKd1T g2Gs7GyYS66Qa9uQv7Sg27mL59upFElGg4ZPJIYTdhuuf+OTX2RkYqHthG7imn8v5uVv 9L6Soco6L4trS6Qe3gKDhHZ3SnN/yxZcFnH0w6QBJ8rNiGLsiSkDaQXisYDLigIiCutN nbuA== 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=7LVaPTCfjPYI1OJzN1Mri4Fv4VfkAhKNfWqasn0hEaI=; b=uJhG9wmeFhOy6vHDkQsPD//QBidKSyzwPr26MXXnGSgJ7i7AgI4W4Nj35bQ8Wt3R8B ks2Wm7W7LBHfgNs6poW5FAc0B5/H7dheExvKe25J2fowum6/WZtRmv0UIzn4FD45AWU4 0IobVTgwgulNN++q5J9mBdEmS1d2j0MuHGPZG+2kuuy6y91ksR5GMJ3ZsuwSIutyshuY +Sw73YkYQDBLUiUIi0MswpNG0ScEe2W4t616YYLVV/dpEEocFO1o/vHt+Vh34PGHIKe4 wStKexBJJq4dGhGIJqUGHkCgWjFx4Qxv8SqIHpA1e1pU5Cjf2e7ZzLYitItSE+Nf1aCl CFkQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="N0Mbdvg/"; 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 g24-20020a63fa58000000b004dacaa17ecbsi10698023pgk.559.2023.03.20.11.10.31; Mon, 20 Mar 2023 11:10:48 -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="N0Mbdvg/"; 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 S232481AbjCTRhA (ORCPT <rfc822;pusanteemu@gmail.com> + 99 others); Mon, 20 Mar 2023 13:37:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232266AbjCTRgf (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 20 Mar 2023 13:36:35 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2138.outbound.protection.outlook.com [40.107.215.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 524A316326 for <linux-kernel@vger.kernel.org>; Mon, 20 Mar 2023 10:32:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K8IWWxCLdzKPFhlRMSsRylXwbDCSgqnpC9aHBBZmI9UZevnH35+RNWiP23xt11hA5vvhenB1BTCG9ohyaq06IJlyxik3ScELGfoA5Bj3PGeOZENfLxPOysMU2Q9O7rt4C4VMpvPS+oU1pM0GZTIiZIWu6zNDA/4pTdEvUcH3cKG1/6jYXQFZpoZ37URpr1di7vDbBLEVsSu8ifEstIZB1Ao3lmQmYTE/g1wcvOs5Yy25mejXGuM39aFI6MA3oQrT/jWYYfAuQlQ6EiKE9SM7O+aH8bPhDXtlpYiqPFA8eV3V7O+0voKMMhl8G/Ng3G8mnm5c2UEBjOYYyxjqGj9BQA== 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=7LVaPTCfjPYI1OJzN1Mri4Fv4VfkAhKNfWqasn0hEaI=; b=LSGA1jQXZCZTVGHwTcAYqPTm5UUHTIWCP9+gPDZ83e6GM1OpReBEPWl46BhHn1BrXPaKsZNf9oM4sWB4EgSNV4rzQul2KO0vngri4sI4NipfswvcEGm1BvDtnJvJrEK5yxAYC+57vfDKr76tB+KebEqNiB2N7pG8CNVSe+7T/tZkhIzF6UU4+JATNuv8Pw3HNXZEHAI6+F4ECCR3OKJcuulEKqix7u36gGzYae6Xn+tS/8IHxl2het9yLRjcpEvb5TpfkRAQziEfnoXVmBbNasBCFai7li8ne8o97CSfgG28MHgJOVDXQ3ZRUw1/rzBY3uLQr8gyZ53cHTunbYMbqA== 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=7LVaPTCfjPYI1OJzN1Mri4Fv4VfkAhKNfWqasn0hEaI=; b=N0Mbdvg/Mb6REp//EARyZtq+1oNJievJO0ZXBV8l3Vnrzf2Y7N806tayMNCz3vQQRvgTCbn2EaQSC7i7tDKlSTop2hKa/GbJfY5Kgm1A/RJUgsGlNwjMhJpViYh77krO6Z30kC9+ovOm3y1EZqKKV0VHopBQPL1QAMxHQgzZzaxNUMcOvruSxLIWWK6ZbsuntLk99jd5n5uuiizfDoTg8GLFD2kDISXzy9fHCt/sAFJPqbhKXVJmIAiIsSMM4+6VdKCnBd37+j+cNJYG7a/4WE0esklwtc1nbf7+s4Gu1CqJ3g9SoJcLpzk7SNQQbcvzonPzYhSKT9hMpGCn+RDYQg== 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 SI2PR06MB5385.apcprd06.prod.outlook.com (2603:1096:4:1ec::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Mon, 20 Mar 2023 17:31:49 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::daf6:5ebb:a93f:1869]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::daf6:5ebb:a93f:1869%9]) with mapi id 15.20.6178.037; Mon, 20 Mar 2023 17:31:49 +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: remove else in f2fs_write_cache_pages() Date: Tue, 21 Mar 2023 01:31:36 +0800 Message-Id: <20230320173137.64413-1-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SGBP274CA0004.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::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_|SI2PR06MB5385:EE_ X-MS-Office365-Filtering-Correlation-Id: ccc44a12-3dc5-4993-77ac-08db2968fc5d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zKNNAoSo9REsFKKUVNepxg+Qq00lfNH2bzih5Qyf0/Ngl1ix6UGDUeg2rrktCTK/OoeGAF0hDrofa9vUc7F7uk5zFy9LhpE7cwMcBmgiM53IHYVWwVUSiJlYM61W959o2gXIPCqyxtoilmOwAja/ZvS4Lspnn2twVS5xjWknXEOikzSOqOVk1oF/7/XASW6Yqn+aZpivFKtwOfzNDQpBeAK0f+Mpj2SvswDC3I7JHIe/BDKvulQAo4KJhgpnjuCeb7JH3JAY7DwIjwUhHanlEZRs264kfY4niTP51xwKpPXox8Tl23VTAfX3Ba/0U3EXhqn77dyDrEZIPMFxBaUusKh8Wjg8NoMHjRmUbahzu3pqm+T9WrbxgVPPrboHME87GmNUQ+8yPNtkXsxKW3fYOUxSUOVN9mpMEWtZq6FZd+1gh2rGXeYkIBbW+Vk3MYnCGpjMFovrizG8iiaoUP6Fn3wx5fz+75PvKUY+EYpnfk8drjDOv950oRKlICXfF/c1mFRlU2RBZ3BO03WDMQ+Mk6qT6mgOJaDyk7oi8nnpMyWCXRp25P/l9pxRStAjjK+/V5SLbadbzvRLQZ1Jt+qLmmF+bNCBXlWKXUJVw1BUY8TRHpMK5C4Z8uTGAOjScrcODdDwpf6wx1EEbFJEDG7WgdPyWpfiLaj1lZGH5aL2AMnRXDJm3OZ5u4iLb7CxU9RzRBuV9RsKJ5htR+HUudTaHA== 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:(13230025)(4636009)(376002)(39860400002)(346002)(136003)(396003)(366004)(451199018)(2616005)(41300700001)(52116002)(186003)(6486002)(4326008)(6666004)(83380400001)(478600001)(316002)(110136005)(8676002)(66476007)(66556008)(66946007)(6506007)(1076003)(6512007)(26005)(8936002)(4744005)(5660300002)(38100700002)(38350700002)(2906002)(36756003)(86362001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Po13rdLamcn8tcExQtIpZm32zlnbAG2wUrKycQRNmpYdkHNpvn/Qt7v5exULiLyuDXunEc/mrK3RaXuB6MVSzCHjNVWPKZSawm3+keJ35MPrjdmM+VrxERWGfYr6dNUDMKcxXzqpOjnpwpnCaC5HICoi+/dz/LsI17fJkSQ1cmp3+1JCeYZc9zMXt/CRsxuEiUo+EmLWk9PjyldNUuXyyNwWB72a3Jj0EGVZ6+o+Zpl1/3J8uG0W/A4W++VhIdBAD4q4uAF196oyTsTza5iOIUq69a8iXVaDlEEAJqbIDPAeHDtos8aln1jd/26HuPtdukNMLlNeuTBngmXwIpnKDUEiS3WVjR/W12SS9w9qhglAfHc6mrQJ5HA/Z4kDMJ3xRui5yZoblZ33B9gc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1dU0nFebECWYyTTomA5NWADG9nNCvGsXh3YNM2wtJjLOk7o9qwBR13hO9/JFB8ikvNHq2bJ+1oM6vWaro/rF0rB9Q1CNzexGoNJCb6p3QznVxJlc X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ccc44a12-3dc5-4993-77ac-08db2968fc5d X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2023 17:31:49.2265 (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: qJTHQnjj56/gCg8tWwEwLfPMgWaDv8yf87WxG2yl9f6Mllicu09OgwcrRnm/1xNktfziv9yLcFo3n8WnmbNwAg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5385 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 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?1760911266273302791?= X-GMAIL-MSGID: =?utf-8?q?1760911266273302791?= |
Series |
f2fs: remove else in f2fs_write_cache_pages()
|
|
Commit Message
李扬韬
March 20, 2023, 5:31 p.m. UTC
As Christoph Hellwig point out:
Please avoid the else by doing the goto in the branch.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
fs/f2fs/data.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
Comments
On 2023/3/21 1:31, Yangtao Li wrote: > As Christoph Hellwig point out: > > Please avoid the else by doing the goto in the branch. > > Signed-off-by: Yangtao Li <frank.li@vivo.com> Reviewed-by: Chao Yu <chao@kernel.org> Thanks,
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim <jaegeuk@kernel.org>: On Tue, 21 Mar 2023 01:31:36 +0800 you wrote: > As Christoph Hellwig point out: > > Please avoid the else by doing the goto in the branch. > > Signed-off-by: Yangtao Li <frank.li@vivo.com> > --- > fs/f2fs/data.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) Here is the summary with links: - [f2fs-dev] f2fs: remove else in f2fs_write_cache_pages() https://git.kernel.org/jaegeuk/f2fs/c/d2afb3f006dc You are awesome, thank you!
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index bf51e6e4eb64..fa931fb768e7 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -3123,12 +3123,9 @@ static int f2fs_write_cache_pages(struct address_space *mapping, } if (folio_test_writeback(folio)) { - if (wbc->sync_mode != WB_SYNC_NONE) - f2fs_wait_on_page_writeback( - &folio->page, - DATA, true, true); - else + if (wbc->sync_mode == WB_SYNC_NONE) goto continue_unlock; + f2fs_wait_on_page_writeback(&folio->page, DATA, true, true); } if (!folio_clear_dirty_for_io(folio))