From patchwork Tue Feb 28 06:07:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yuezhang.Mo@sony.com" X-Patchwork-Id: 13154446 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6A3AC64ED6 for ; Tue, 28 Feb 2023 06:57:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229591AbjB1G5R (ORCPT ); Tue, 28 Feb 2023 01:57:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230169AbjB1G5Q (ORCPT ); Tue, 28 Feb 2023 01:57:16 -0500 X-Greylist: delayed 2951 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 27 Feb 2023 22:56:45 PST Received: from mx07-001d1705.pphosted.com (mx07-001d1705.pphosted.com [185.132.183.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 969792448F for ; Mon, 27 Feb 2023 22:56:45 -0800 (PST) Received: from pps.filterd (m0209328.ppops.net [127.0.0.1]) by mx08-001d1705.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31S4RQ2l023589; Tue, 28 Feb 2023 06:07:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sony.com; h=from : to : cc : subject : date : message-id : mime-version : content-type : content-transfer-encoding; s=S1; bh=BNyl0x73b6wVgZwRcK+kG8YClNy0xeSFgcEU9B48xJI=; b=CzKyoE9vKHIU4dWYTho77t7nPxLob2bfkwWQMExB2FnQ3MTM6/F0fXf8C2jQrul0gVmR UaDXKi1Tq+1JKRRxywqiYdPyhzqVwxQiBjPl/OuUj8QOFd1wilJvPk8SHyoNONTGkMd0 SKFBaZzTmFaDwlSZNdZ/YQ7+848V7Yv3w9QKwrR8LJHivajpemfOdMqow2dMt4uY2Ak9 ipmfOjP6DMsPLJdb+hNGGzm83BQEC1a84qxnYPY11yD6ACBmZgzaq6ratQQQAjSTEKSF VSjdLLujfxKHQffju2VrmzGnJ4T170inMH/gyyH4Bfqgp33wODMk3GWour7Sux552n2Y lQ== Received: from apc01-sg2-obe.outbound.protection.outlook.com (mail-sgaapc01lp2107.outbound.protection.outlook.com [104.47.26.107]) by mx08-001d1705.pphosted.com (PPS) with ESMTPS id 3nybgnab7h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 28 Feb 2023 06:07:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=itc/3ZLGhVOCcUgZFMOVLPyhmTMGEWEWWHiktshycg4hDxzX3QOcnKcU+Nx8sMrNL/U9EHO8CBU/i2Xqg3sVIjmFpD2Qb4W+OTM6ekyvhsrKRDSePGHY9lRV0OZB5PDFRvHnhECrYSXwewj50KsQ0FSpOTS7AA6gTTXqc/HdlaU78vuE5ppfc9h4KyXxqzqi1nDx3qtMOBu1I6AzLSAe1gIY343y3agz/jHneV9vZ7Fotx4XYsHunh5O1aYTNWqL9zorGvfOCGODey7OTTLcy834fncnLxdKMwaeigA98gX7uul1DKpJNtX5JcFjQqM1Ix/N36HmqjMVdXHVbxnQdQ== 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=BNyl0x73b6wVgZwRcK+kG8YClNy0xeSFgcEU9B48xJI=; b=kbb5z8syWzd8odJoGScqrgvToeIqsJkdTR0a8J57/7DNBreokQZ5Wfg7WcJhRCFbYcYJCAK/BkCdh8V+t2jB7hSOJxC/LaTgu9nVAAcOujjp6N9uZRYksk1bQpELThI96gozotWKLcROGWfCIkxbdFXs5PmmN4y4RcyhkWpoVX0dcOLn3SFup3HYKZBd4CAZeoTdc0BSm27TOrkRs5ActDi2hojKjtS7NFsQcPyuv9/oLIhFgBj/dfjdJcQEWexo5qOvXa28Z8GKbnMmxxyUdfr+VZroFiBd56+TCpM9+PgFExShq8oBFK8kBUzcsk3og0oCNOQg+q33cRVn62Vn7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=sony.com; dmarc=pass action=none header.from=sony.com; dkim=pass header.d=sony.com; arc=none Received: from PUZPR04MB6316.apcprd04.prod.outlook.com (2603:1096:301:fc::7) by KL1PR0401MB4227.apcprd04.prod.outlook.com (2603:1096:820:25::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.30; Tue, 28 Feb 2023 06:07:18 +0000 Received: from PUZPR04MB6316.apcprd04.prod.outlook.com ([fe80::779:3520:dde5:4941]) by PUZPR04MB6316.apcprd04.prod.outlook.com ([fe80::779:3520:dde5:4941%7]) with mapi id 15.20.6134.026; Tue, 28 Feb 2023 06:07:18 +0000 From: "Yuezhang.Mo@sony.com" To: "linkinjeon@kernel.org" , "sj1557.seo@samsung.com" CC: "linux-fsdevel@vger.kernel.org" , "Andy.Wu@sony.com" , "Wataru.Aoyama@sony.com" Subject: [PATCH v2 1/3] exfat: remove unneeded code from exfat_alloc_cluster() Thread-Topic: [PATCH v2 1/3] exfat: remove unneeded code from exfat_alloc_cluster() Thread-Index: AdlLOnYM/msEcfBIQmWIdYvNavIEWQ== Date: Tue, 28 Feb 2023 06:07:18 +0000 Message-ID: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PUZPR04MB6316:EE_|KL1PR0401MB4227:EE_ x-ms-office365-filtering-correlation-id: e2bdda73-94f4-4515-8929-08db19520bf0 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 7ywCnNHknJTdtFA64HxuLTqMIUdn27vKMhPttydFZWvXJRvkxOnNg6wAMIq6O0Gb4+bvPftUSvLKjIt68fgcqMihGOxyiluNu8wotwbH4lorpx1wMqk4zJ6Ef0nsr1QSrZLHEkjzGYVfddzihPF+3mV9+ruRczJh7mJbRfwaKklcUGSexTDRnItFNcEMfAg3kEIZ7rpjN0RMN4+oVNkJFNDPi6FX/HemkSOj8t6l/tWlzo+kS3b9RjMSgkrrLaQwcUA4fbGQ25sCQnUmC4KB9g1/ncZ/PcW7AC4ml0rM0BPn+UH93LoK/YssMA0OYrmmuKGpf7vc9vXQELMzh9IG2q4OM6walfNFSUT0b2ZUSXvW1xe/iPefql9nFKnP4Finszrox/DnbPqy2eiMzZW/v1I0hFJgH/SCoKp54VAgu9nSlwUhl1uNu15lWtuxHXYfZyKzwTP59/U1BOgptWZyR4YbztFtxTuGux813a6AmEUeLzRhgOb0E/bgd42ADsoEe/L581NIbyVEm0GYBVnHWvlgVDWj3x/zqTSEWLTYGnJFEpKDMC6OW45R81c/cos0rsC8ZaimaWUeaeaWl47ucEMtxIqjq1LhGeiP+RDzXUXqISGBdG+M0q6aMTreHN6GTQebPlEpt8Tt6QMajU0cZQ0F+h9BBCYTzzjcm7lKcs4HvNdYplzn/xIVmXofp4cg x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PUZPR04MB6316.apcprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(346002)(376002)(366004)(136003)(39860400002)(396003)(451199018)(110136005)(83380400001)(33656002)(54906003)(316002)(478600001)(82960400001)(38070700005)(122000001)(7696005)(26005)(41300700001)(9686003)(186003)(71200400001)(6506007)(107886003)(5660300002)(4744005)(38100700002)(76116006)(52536014)(86362001)(8936002)(2906002)(66946007)(8676002)(66476007)(66446008)(66556008)(4326008)(55016003)(64756008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?0H93ggAhm/RAxd+7Qh20rSKHHTcc?= =?utf-8?q?WlS3+zPcd8bhcTWv9mo4iDFj8UBpQVZnl8rkp1nBFdUjP2pvPKL8/jCGVtkKEmbiB?= =?utf-8?q?6wv14JtMnD8a7jpNZZbsXVbSlvAcZ43Xv1my8spE876mJwuPirnYLH5ksc41N15+V?= =?utf-8?q?JOx9hFvxtcMHauQXP7RP0Q31ZU5UFALjLOta8nKDw0U7HIxWgw7T/o0CVgPCdAzo2?= =?utf-8?q?km8tvCH2JQS2rzzdWcemd0aRT/H0XPH3qG8U0vZOrLlGLGcc/DFrq3Y0i7uO1f4Hw?= =?utf-8?q?17RR4OtE+3UkRpqqKv38qb9Y4//gAOC1wdt3xpeQieuDNputV6tw8EwdQXzSP9L1U?= =?utf-8?q?D1hZ/Bkcl6YZrWGDjmV8NgsSCnR/dlCn8EhmdZHHdanv0u5rpGsWQkMl1bnpVJddj?= =?utf-8?q?T6vJqMX/h/w4eXsm2XiMzZAEUUpMgtfYxh3SNF6VrmuItucS4QI9cEcQmtUHe23d3?= =?utf-8?q?ZR007EVndxUO80jt4nou1HPWR4UqtJsuojmx8mOqcXuc78JpZtKpFqSnj9qNCP/s8?= =?utf-8?q?VcUaDBLCc0TNYd+rSCbx0JZKjV5QiRagrVvNMn0SegIzWp9pG5Iri04/OWJwg8MWa?= =?utf-8?q?5gZnHVL+14/8l2CpAD9geBHaqS2dJ3EwyTZRIgaSTvuX66NQSek/vJWwFuepbIlHc?= =?utf-8?q?A/NCmPH/GTZ0gxEXyV15eDkUXSwBf76/5p3QLo6p0LxpefyqN9kHDth0pK/ZE3246?= =?utf-8?q?oYIUYowT/iD2jgFkguJXZIDC6bwCya2P8YlsziLwISAJwAaVnnH27kBCbScyw+pSb?= =?utf-8?q?MuqF0W2QKSZLDWX2a0yya0DnSLfFDN2lYM2dy209ic1Hlj7lbqmbuXtkAj0Zq1kOI?= =?utf-8?q?MUUb+/R0kGnQJB24Cc3Ve0ya9ZejNhgQiLGSJIb62ITdwKl727Z6/9AWKhvMPcsgs?= =?utf-8?q?JETurqatbKRDE6db3SF3VYTRolmLgqDY4xxpSMfehG/GpqfQ8ZQYVMCPhzHJhcnmp?= =?utf-8?q?XaX9lvBtkhcPuadqveUJD/ABP+4N11dYI1aparFtItcGuWGa2f2J2HstOQSiibaRN?= =?utf-8?q?OCY5U5MS4VgSorf7XR9Z+hD5Pu/W8Xe+/pJA0fWvhyMBfpDsuYwPeGGAVqP26pALj?= =?utf-8?q?WicJ0ZSak/NPFbZekAST6YFYmoKjsi8nW4o4ETMCBljYruYOR6SM5PiCmFbL7Fpcf?= =?utf-8?q?yJzOFAav46HCzJITXIE+xRnM3lMm4iVf0JSIJ2qIm1ZJ2SdmVceWtfVbDS6M2lxTK?= =?utf-8?q?RpYXfn5xhNbOwP9qYszWGqzP51VsqSOIFYkldA4ElPzxzzkT+dB2U6bV1c8UIMmBT?= =?utf-8?q?gn/aRLfhKBmnzGY4Vo9HA8cegRl5SqXi0bsWwT3+kuCwgsNivKWk2NaLRYgrnaFWj?= =?utf-8?q?H58HXd83VGl6umAhro411m/elsfkJCUV/+3obwMuTr46KZ/5UYY6Fr5S+Za61VIEB?= =?utf-8?q?4vT1I054VFsloCGOqLCD4J5h0sGVMW4vAQKXlPoqJu19bbFdQWIpLkc7qZJmeinRM?= =?utf-8?q?kbSkJa3zu/L9GwOK1lS8nprPE66DxtB9RCT827zJRKOKJvz7R31AtIU2aY3VaIMtF?= =?utf-8?q?a38RKO/phm05?= MIME-Version: 1.0 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 4BMGJYaFgd01c32iu5/EGDJ1ERQ7ntZXW1aKid1a85YAGNKrAva/kvO1FbWmagj735kweDes6HZBoa5lYYXE72i9+ULbGrhTSe75Z/ajwQVlRhh0cTjeKKt/fkpY7HyIM1ut+U33/Jbqm825p6Sh5mQJkfM9Pca2AOM/hYOgEarFG01RJo1EyN3FyLrfAWsD3NS+OpI36w1OR/L0ywENqPM1jZt43zNOmNf0o+1Liy+/MpZ/MK0oeGRZG4A53WkzExPuUTw0CDLYIDfxHNNTSkEiws1PfSq6os4FBq1NbVPerlMmpFAnoUktDO6V4+pDrP50fmgd6Kz+41m+hbVF5FBKOm5w8fRT2g/ELDRyKKmduOLIAGxDbPJQbzC+Yh7HqTCPRy9cxqU/zxIqZU3EnSE2zLM3A5X1rLTBUtY42xuKvd0iGcndcy8/3iH6VCxdsaoYlnYJD58a7IJKQtwLiDGg/OQvsH4ZEJ4dpmMCJqRoTWDVyu+r1oTa63vXAsE8YV+h+7VnqGsz7GiOzeucrkSRsx3goP/sLND1blP2vS0JwDCKUSSD38QYXYlfxS6y4Ur5lfpksBIarLj4NKa7UnoREuiAtH8fs8xjbKUQILf1fE5pOUS0l1tmYo7k16xPnTZ7hGBmpXbn8bMVqXzRcqbDdrVvU+0jJ1u9N4OrOyMMkFIEP6nqOcM4PBDSmG5KAzNu/zA1WQg+f/dZJnZONaI72n/yOGezEEX3A/ixMz+HVCB4JP0yOjGCRgOGrcVhsgF6aBu9oSZp5vsURNPFi9xL/ERYy3BJNsQIrS4Hs2BzSCrqDvtMBlAtuc5mNBCK19ju9iO0DxRcZKbQX5D1yA== X-OriginatorOrg: sony.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PUZPR04MB6316.apcprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e2bdda73-94f4-4515-8929-08db19520bf0 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Feb 2023 06:07:18.1070 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 66c65d8a-9158-4521-a2d8-664963db48e4 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 5qp9XsqFbN5uiFyTLjAfuJ1Yd4Rd+08tSWg0VBqgVTMY7uc5rImj4A1Ow+zTSOU1QIbK3qJC3ly3aC4oysVs8w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0401MB4227 X-Proofpoint-ORIG-GUID: F5rL8jtTRCBcjhDas_eGF06qNBzERe4y X-Proofpoint-GUID: F5rL8jtTRCBcjhDas_eGF06qNBzERe4y X-Sony-Outbound-GUID: F5rL8jtTRCBcjhDas_eGF06qNBzERe4y X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-28_02,2023-02-27_01,2023-02-09_01 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org In the removed code, num_clusters is 0, nothing is done in exfat_chain_cont_cluster(), so it is unneeded, remove it. Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu --- fs/exfat/fatent.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/fs/exfat/fatent.c b/fs/exfat/fatent.c index 41ae4cce1f42..65a8c9fb072c 100644 --- a/fs/exfat/fatent.c +++ b/fs/exfat/fatent.c @@ -347,14 +347,7 @@ int exfat_alloc_cluster(struct inode *inode, unsigned int num_alloc, exfat_err(sb, "hint_cluster is invalid (%u)", hint_clu); hint_clu = EXFAT_FIRST_CLUSTER; - if (p_chain->flags == ALLOC_NO_FAT_CHAIN) { - if (exfat_chain_cont_cluster(sb, p_chain->dir, - num_clusters)) { - ret = -EIO; - goto unlock; - } - p_chain->flags = ALLOC_FAT_CHAIN; - } + p_chain->flags = ALLOC_FAT_CHAIN; } p_chain->dir = EXFAT_EOF_CLUSTER;