From patchwork Fri Mar 25 09:42:08 2022 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: 12791384 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 ECAC5C433EF for ; Fri, 25 Mar 2022 09:42:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354687AbiCYJoE (ORCPT ); Fri, 25 Mar 2022 05:44:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357904AbiCYJoD (ORCPT ); Fri, 25 Mar 2022 05:44:03 -0400 Received: from mx08-001d1705.pphosted.com (mx08-001d1705.pphosted.com [185.183.30.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDAB5CFBA6; Fri, 25 Mar 2022 02:42:29 -0700 (PDT) Received: from pps.filterd (m0209322.ppops.net [127.0.0.1]) by mx08-001d1705.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 22P4kuci032355; Fri, 25 Mar 2022 09:42:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sony.com; h=from : to : cc : subject : date : message-id : content-type : mime-version; s=S1; bh=0jy1Q11krTW0IwSAiZvlkFDm1CwU+j4KZU7DquVCSXk=; b=ogrPfy44l6siWM08VHTOKBYcOkuQq+UQ1jhmmgltXHpUii/47jNpXy8oqoAtQdnk7T2z EK9UjAg1IE7p9K6fl1sJ9hVAnvGftg5iRwmjYLS1JMzL2wGRMCmbBr3nmuk+EufUjhwQ eW6jFVIXtoJQC/lXr7wTZZOwKm3/yrX5fFLMJtghSAX2Wf49Tu1MEy3g8RVAjjAHKfad EK1NarSiAKGTtROQvIozst5ULgUk6bzPtZ8GL2vy3FBwBPUOM5ZIqcMQDVQkQVtTErvr AsUbNjxfsFG0oFZQ8QE3pXanT8aB5AN4GCXLzflJWafi/DA9FPnf5JEVNrR//DlPp7Tf Cg== Received: from apc01-psa-obe.outbound.protection.outlook.com (mail-psaapc01lp2048.outbound.protection.outlook.com [104.47.26.48]) by mx08-001d1705.pphosted.com (PPS) with ESMTPS id 3f0yw3rk6g-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 25 Mar 2022 09:42:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MQi8Fjx4ipVYUtLTk7wV5zqLbXv22aV0jgHvrw46fh/YU4jDHVEdVv4tzhR+z7AY2F33/2aXIBdSjz53UvwYrQv8YTWjhRf3EZvqf4UrVbbXWjKw7aKEQKkC8LNMPPr8DKeNLVsaavorWUDWWwoEjkfuCPfZAuW6RJnQj69xiVtJOHwo2vXDeKDL5HwQI+yWeqajif88PvRr1ecsDnET/m4j172PQuU6i6EoUIBJvzKEpFcgI+fkjtlMZsleD2csPjAvE8EmZ+qrEYLFEF45grMxCyVDoOMc0/uIfwaMzKIzr2ttnLyUQ88T+woCHjKTpKtC8a6u/C14JrT35DM6KQ== 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=0jy1Q11krTW0IwSAiZvlkFDm1CwU+j4KZU7DquVCSXk=; b=E+B5XtTXSuO0UzDiKcNgU26SpXeAZzglBfLPb4ZCplj6NfXKsidXwstlwICZg3Pz86W4L5v4tYqsF4W9XlsBFoJZbr2bJCFOhzhHlLVxxLdvSLxdTdXODgd95A6ydxPdvEF/NhJLokifrIeKmb6ZarxeU1kmMceXgFv/4WTb8uObEMBcrggRRMa7r/yuy0jEpImNaM1P/+BFDvDU1S0u806kV61QMV9zJUUrEX/Pd8EWIKBBEQPaF1eTs1VFhYiEnJx5xucJ9HUREjuwCDVOrNUy6e1Gk6IRB+yILUCywWV0iJGb60xhzsxdzMXilViiqYGsI9g1C3g1ovY7GlCjrw== 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 HK2PR04MB3891.apcprd04.prod.outlook.com (2603:1096:202:35::13) by HK0PR04MB2386.apcprd04.prod.outlook.com (2603:1096:203:4f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5102.16; Fri, 25 Mar 2022 09:42:08 +0000 Received: from HK2PR04MB3891.apcprd04.prod.outlook.com ([fe80::7440:bc88:211:6094]) by HK2PR04MB3891.apcprd04.prod.outlook.com ([fe80::7440:bc88:211:6094%4]) with mapi id 15.20.5102.019; Fri, 25 Mar 2022 09:42:08 +0000 From: "Yuezhang.Mo@sony.com" To: "sj1557.seo@samsung.com" , Namjae Jeon CC: "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "Andy.Wu@sony.com" , "Wataru.Aoyama@sony.com" , "Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp" Subject: [PATCH 1/2] exfat: fix referencing wrong parent directory information after renaming Thread-Topic: [PATCH 1/2] exfat: fix referencing wrong parent directory information after renaming Thread-Index: AdhAKsEtthO71fDaRs2uNUmwvcqVmw== Date: Fri, 25 Mar 2022 09:42:08 +0000 Message-ID: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a345c88a-1838-40fb-a34c-08da0e43bad8 x-ms-traffictypediagnostic: HK0PR04MB2386:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: fk5h0ZLSPAgaN/ZizUjBcbPe1CjqYxthxO4JpsakTYqvip3zponkw+M/rW2ZPsofKm1+QRnnKdjygHp0myYC0vu/WiytdWCgiN35hfBJp425ivTPiIopnzDTYWCAVMBmk3m4Uw/Kkv7VFr9q42QC0acSLU8th0/JMjxr2YxnjjLW+XYYstTX5Ad9rcluzpBcZT4oB27IjK+ptMueN9dv/2VjHhH+bTxJbbUr2gVcY1BWYbydSN7rkqCVlW2MZN6kBesNuHfGO8aFfes5DcElH45ULftc2TXO4psc3RAsOlEmu4oCQdiEBNcsRaEWhdQUbhefW4m5HqjnHsu/D6WQN7g1ve8fbZjWjyYAzvrS/9XphOzSt8j6SV0XvGB/d9vjPiKCxQfp3qC4QbMzkQkYP3pw2HMUl7EY8iXOtyVJp3xfriDhTtqhdJtosXX27ceeVnIbhDZBUG3HyTYMjzyyOgVms8sjp7kXnqhT/mdTFLCtyc6zL1F5hYSRFNz9WVGSLl65f49e0Lfa5zERKtp4KnyxfSgZYLJhNQUOVWEI1Y1sZxbxNevPKwAAflr8bcqYndWJoeyRrECAPpK1OqpKDXlQS/Kw0sg+7i9jsxFInRczwTNLgynXuA44ygNdLPe2NmhddqWecCW7St3U8N927tKMaWi4OeYyDu/EoqaHEIACjj8ezu8RrHqM4mGT6PBaeQyopvwJ1Ki58r7124OjNw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:HK2PR04MB3891.apcprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(4326008)(316002)(508600001)(7696005)(9686003)(64756008)(66946007)(2906002)(38070700005)(8676002)(6506007)(55016003)(71200400001)(8936002)(26005)(52536014)(76116006)(186003)(83380400001)(66476007)(110136005)(66556008)(33656002)(66446008)(5660300002)(54906003)(38100700002)(122000001)(86362001)(99936003)(82960400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?nplz8Qz7Ki0smPXV0vmdGY5PR7HO?= =?utf-8?q?bUhL0js+GUvnXn2fq+k1W+SBoldcF+x1j4yTpF8cQq2XrOYczBA3CiLQfxVc7sgxf?= =?utf-8?q?oHLwTeXL9fCS/Z3I3XEJz/d3CZa7RabbOTMnDNpIRcIFkp8Evxgg5dIHNY1yk388Q?= =?utf-8?q?VgzsVsj1jycZ1kJUr2fHx07CtblqX1Hc60/wtcrmxcud1W9e2B8cG6OHm597q9Y/R?= =?utf-8?q?HhLpOkpVyD95e43bFi42xc+Zih3ENVMRB/zwyiQ9buF2G3PKsDN/hi6DfiuUBr/U6?= =?utf-8?q?BlutoWhQxkwOn1xT4UDM7FM9aYAcqvqHEquYWFtGGOCIvGp77R+Fbw2X8ipbQa02Z?= =?utf-8?q?Xl1q9dAI33mzttl0ogsvuWGmY8IFwbNycMnSAnVdNAVzlHveDTxHP8xjXqIqWv5SG?= =?utf-8?q?1lrAMOvKreZlFpueLRNWaxF22kljGfK/DLrWNbXPGQI3cMvn/FNaw/REEFDSutlnv?= =?utf-8?q?uO/vEOXZ6nwpCYf9Em5qR4+sIOYXyPO4tmNPr+7u6ZOodXXpV5+2jLTlkMdUKL32I?= =?utf-8?q?zAQc1ts9nAa7v/TVH/E1BEjFyVBjaaiNhzAMNSXw5w26D3kiZeZxJUlQEXeY/HLTn?= =?utf-8?q?EklQy3xqGw8ym3/Jyy9w9hmLeLUmRX1mpPK2JcBDbXGLoTgdOh6fuC8ZzFTpE8oX5?= =?utf-8?q?nd8R9qamJFnoKxU34ujHVI736O/kUPjoRWOjTU2+zq57OoYSlnP/q/jvuplN/rVOl?= =?utf-8?q?G1vcbSCabxlCsDAxlZ/PY9kl8dqFcMimH2MfOCjtf8aqZxZH+N6rksJVwe1smbcc0?= =?utf-8?q?9AuH5FhGeu3aAI6Z54pVvkWGzOBiNyD6u0VFO1mlKmbRldipeq4k+Veub5dVnlTMg?= =?utf-8?q?R1bPzCkkqCuWBb0I7L9X28qIGGix2ZrNHldo29ZsLpRSuT5UCQUvsz+Ay8K37cSLm?= =?utf-8?q?Zqwt9CLRj5nNMaJ1wNd8fEMfNSyfYwEeoiBjZSrwrGsPje++Gn4MomNsz34/O35q3?= =?utf-8?q?e6QXHh5w4r/KeoY/m16eHTQdu2XrxQj8lxIXsCKsX0wa10+yUErb/Qt5bMfov4xkw?= =?utf-8?q?+6ILSoYl/t4LBh/oXDHACR/DaYsZVEUcybDmm0QhBoyij0/QDPeWMx5yZ9SubBKil?= =?utf-8?q?Mi/F9UzNd6nALHHz6uR97tF3r9xncghuqTSvyFf+MHWTVxJhoI4hdt8rbpTblrLFx?= =?utf-8?q?dt9y4tiSfPXtmo2bI/QOjwFgKNaTzqNr3HmT14h3bdHRhi5+OTAE4o1FPCkxHZJ7w?= =?utf-8?q?Hku2dq9lO5U01Ufiu3+wbPQCJQ8ZrILbWBlKCv4e1CTsnvh+OWr/Eb2UJGQCNlSXa?= =?utf-8?q?siKObfFYuSMLozOMldWYeLd3Syj0s289NBi1N+fl3Bhe01+iEqjVH0CVfKNaFu5q9?= =?utf-8?q?uxaK+KEkqGy8g9+6uHuA0mUGb1sd58yz7khV0kJKJyNb3oqoIi63rQ79H/0crLDgK?= =?utf-8?q?p8dPxtne2WSq22?= MIME-Version: 1.0 X-OriginatorOrg: sony.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: HK2PR04MB3891.apcprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a345c88a-1838-40fb-a34c-08da0e43bad8 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Mar 2022 09:42:08.5922 (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: m41cA1jW0mF1UoafSeTWFqlcn/H1IfW1NEK554BIxpj0zzzigsBtdbfDVxA5SmLSE384dlDWpwHlwKWhGxZ95w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK0PR04MB2386 X-Proofpoint-GUID: R-mx-bLXHbbd9taD3GWx715hZc_2ZWn0 X-Proofpoint-ORIG-GUID: R-mx-bLXHbbd9taD3GWx715hZc_2ZWn0 X-Sony-Outbound-GUID: R-mx-bLXHbbd9taD3GWx715hZc_2ZWn0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.850,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-25_02,2022-03-24_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxlogscore=999 phishscore=0 clxscore=1015 malwarescore=0 mlxscore=0 adultscore=0 spamscore=0 suspectscore=0 bulkscore=0 impostorscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203250054 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org During renaming, the parent directory information maybe updated. But the file/directory still references to the old parent directory information. This bug will cause 2 problems. (1) The renamed file can not be written. [10768.175172] exFAT-fs (sda1): error, failed to bmap (inode : 7afd50e4 iblock : 0, err : -5) [10768.184285] exFAT-fs (sda1): Filesystem has been set read-only ash: write error: Input/output error (2) Some dentries of the renamed file/directory are not set to deleted after removing the file/directory. fixes: 5f2aa075070c ("exfat: add inode operations") Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Daniel Palmer Reviewed-by: Sungjong Seo --- fs/exfat/namei.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c index a02a04a993bf..e7adb6bfd9d5 100644 --- a/fs/exfat/namei.c +++ b/fs/exfat/namei.c @@ -1080,6 +1080,7 @@ static int exfat_rename_file(struct inode *inode, struct exfat_chain *p_dir, exfat_remove_entries(inode, p_dir, oldentry, 0, num_old_entries); + ei->dir = *p_dir; ei->entry = newentry; } else { if (exfat_get_entry_type(epold) == TYPE_FILE) { From patchwork Fri Mar 25 09:42:18 2022 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: 12791385 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 9EA49C433EF for ; Fri, 25 Mar 2022 09:42:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358081AbiCYJoQ (ORCPT ); Fri, 25 Mar 2022 05:44:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358144AbiCYJoI (ORCPT ); Fri, 25 Mar 2022 05:44:08 -0400 Received: from mx07-001d1705.pphosted.com (mx07-001d1705.pphosted.com [185.132.183.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2CFECFBA5; Fri, 25 Mar 2022 02:42:34 -0700 (PDT) Received: from pps.filterd (m0209329.ppops.net [127.0.0.1]) by mx08-001d1705.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 22P4sY4d014911; Fri, 25 Mar 2022 09:42:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sony.com; h=from : to : cc : subject : date : message-id : content-type : mime-version; s=S1; bh=YRTlMvAm4AIST9JKiXF3F3auYVKUmjcLH6oij9Htt9Q=; b=IEc4aXDRFpKFBWi8oIWbVCGNVZTYzHrbd/XbNv4ck9N/B3f52f+8wx6k0oNfx2HS8sjJ Gur+s3eTZW8b28F+7LjHObE4kgH/5xDDbX8rpb+W+qwJuCEAgkPSjQ46gMC2TJA3aZnj xT3PlnhDRj782CU6FrGNrK6p0t5byycRST+WDYLeka1ZcClO16iOOes2CHyYum6pPV0R r84YgAuBcFmjn0Y8QZ9YdBnanF60RTXF9VatKGI/pO8lMXedSZQzeyae8PsbQQ+IrD1C qhNKZhGoop+Ax4DGbiA0fJUSiMn7iwz3o3TiF4KzF9eICQ8MxUXZHvo0hWlnjqc/sBxv 9Q== Received: from apc01-sg2-obe.outbound.protection.outlook.com (mail-sgaapc01lp2110.outbound.protection.outlook.com [104.47.26.110]) by mx08-001d1705.pphosted.com (PPS) with ESMTPS id 3ew5txdkmt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 25 Mar 2022 09:42:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JiFnsyKZs+oO5y8mhsGdPLgozu/Ri1ekVB2ZAD3kyMUU7COv67N8z4lSeLsDOFWLXv5f2DKjIAErcqKttfti/SNxF/1N7+T5ize5MZWD+azl5C12RdLL3RyR0JQrXsZy9r62Z9VoImcBEV4MQKGsIZ5qdcGJiTf2J8wUc9jp4ee6XhOmOjOhyiYf2PTkNlf2FVxkXoNgjjlrbQYe37/txTxQ/PFPMClYBo8IF7fk86qDHsK0RmMQnrQsaG4KMXUwV8xm57QC0mR6RtqS9VMPPtTVWo1sOhxkc+rLaJE0WALQQVdqWLELYo6HKT1TJ0SGDrj3jvMy4nfhpg5oCH1L/g== 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=YRTlMvAm4AIST9JKiXF3F3auYVKUmjcLH6oij9Htt9Q=; b=T9/t4u5gmZNqIJX+D2aFGY5rFkjJZn665MkrzrkRcaQAnGCesLzB3AyKnXmoul2i87iXC6mf14Z4ZzSgvtZNKfLi2dLCITCuTPC6H0/U7D7WKo/yH1enM4TN7flhq6cDwrYoT4hFY1uDELT6++7N64ZhPOJ1abVkMpRW28XwTxLXdWcX4ldzi/X0sQr6h6wXf6CyKrxJ++Q2MtdAUcfDOoCgPrtUjMOsWa6tYKKH3mIySLf3iW0Y97O30qrZnWvRGdIC/Q9iZ0Sm5cpxC5RYhwgX2c4gowEN6xN/GxXiLV9r4ltD82Iu9/zCo4OuXXH+3NcYAt64ebxeRD+HcW2Heg== 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 HK2PR04MB3891.apcprd04.prod.outlook.com (2603:1096:202:35::13) by HK0PR04MB2386.apcprd04.prod.outlook.com (2603:1096:203:4f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5102.16; Fri, 25 Mar 2022 09:42:18 +0000 Received: from HK2PR04MB3891.apcprd04.prod.outlook.com ([fe80::7440:bc88:211:6094]) by HK2PR04MB3891.apcprd04.prod.outlook.com ([fe80::7440:bc88:211:6094%4]) with mapi id 15.20.5102.019; Fri, 25 Mar 2022 09:42:18 +0000 From: "Yuezhang.Mo@sony.com" To: "sj1557.seo@samsung.com" , Namjae Jeon CC: "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "Andy.Wu@sony.com" , "Wataru.Aoyama@sony.com" , "Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp" Subject: [PATCH 2/2] exfat: remove exfat_update_parent_info() Thread-Topic: [PATCH 2/2] exfat: remove exfat_update_parent_info() Thread-Index: AdhAK+2AhxgEsqrvQY2S5lzzjVrKNQ== Date: Fri, 25 Mar 2022 09:42:18 +0000 Message-ID: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a6abb3e2-aeb5-4b8a-2bb7-08da0e43c0d3 x-ms-traffictypediagnostic: HK0PR04MB2386:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 9omKkoAi56lf0ukjLJQV19DsyAXOZ98+gBafBr+XBoGKkURkswEM1aXBHqE4j3ajnJ/NeV7LSv0jFucVq1sBbi14xhSr8mPq+lUtb8aAMOw+YFT6kTV2JPO73exWlQeSENg+U69XNSWH1OCffV5EdqyFc8xkoWx5GXClRF3o4dm26erlLtNWF9150k0eMCxMw0xFz7rb5T7efg/UoRVWv4nQpnenGX3UigQDPFlG1Do259pdhzFXXxcogqhxN9m0TpGiu2vhQ7kj2hTDvOJA36I0pWLBM5C/9+4oaVIGOvX/EQ1q+r50oHgjqQX4M72diFLYyhBFc1tqjvgQfaFipGIsIjhsByUOX1/A+PAizpb2tignFLjwf+dFLvjWRIipTGlnI+uYr7BFHh7stxdLitjiJKeNPrYmidQzwur+UteEMXHN3CY+FQiYQbz4otBNpewkeDElPFHPP1XapB3drM5egz1qP+riY9wUXWneMfFpzgCYGf+xe0HvoZMegEj/Yj7GFgNu+ZfdPRWMxM5QBB8BMpm3KvxyATHrYrAVQEfUzq3qbdDQOCAroEprJi//Uy66I63PHngjqqipdnxObS2RvOKd/CzjamAWUbnZPzrGC/EDXdksmRPIyBXg23ygjOK/8WFE+2Gsh0iW+tTdpkzuyAq+ziQW89+UYLZhFmwrJKFhYN7A1wHtAqOtx+IQvP7G8pPKNwOzpRe0wxkglQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:HK2PR04MB3891.apcprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(4326008)(316002)(508600001)(7696005)(9686003)(64756008)(66946007)(2906002)(38070700005)(8676002)(6506007)(55016003)(71200400001)(8936002)(26005)(52536014)(76116006)(186003)(83380400001)(66476007)(110136005)(66556008)(33656002)(66446008)(5660300002)(54906003)(38100700002)(122000001)(86362001)(99936003)(82960400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?Wu6VumFwgo6QfO79Eqsr2NhAL0r+?= =?utf-8?q?wYU78B8uo1vqGWmaPHUX+UwODAi2yCxDsGNJJJ2Hn2JBtt+dkXrDmpmsHmDNM0fRH?= =?utf-8?q?42PFKnS+Pu1d02fCWuSKuyARMSc6vNY+WJiCyGfELZ5PjJkUAEhPfvp+JjaGSk4JP?= =?utf-8?q?KUfX6Ur1lWSB+CSXXQelLPnNS5KpbmDfrEbfxccwtNlXIxF8h0s9Ey3IOLdGoGHjC?= =?utf-8?q?7yjRth0jG2UwMM62KuTlgZCdpZZcLzK5O8OZS9j7lyF/UGXRUzOb8rs2Yi+jclLCq?= =?utf-8?q?QpyWXrw72Ek6CLczkB3IZRSTRJBqoOE6D4KOCN3hj3mbnYWQ3PQ2HiNlknEs4Xjuv?= =?utf-8?q?tzGOcjc7bf2wuaMn84b7GH4j33C/OkbnhdAPEug4NzyOyXZHOdaTmqQ4HCdytI+CS?= =?utf-8?q?VT3AEffhf/nl8nEahiyFR2AYTwX3Em9rHZj78fqCVGG+TeA5sirvoa6Z1g/9WYrvS?= =?utf-8?q?LL2aLQ5rkuihXjoVYR3hSNW5dsjjaVCaO/Ty30onAY8+WXDx3R1DPjZVMI5PIZvLd?= =?utf-8?q?vZjWFK3eFDRTwBxuLI9zt7TlSTKL22p+jlU1AGIgh954XPMRd/HDQtmrluxriX6Hq?= =?utf-8?q?jjjfmd8d7OC3HbdTpPU5hon2QLmi9igtXmwA4VAWZptoiPMEqyEL9VWMSgiqJOIYu?= =?utf-8?q?S+7wR+1JB5EXW+Yv+UJn7FxjkX7D+UxLcHy290CNPjXtewEWOdaUPMP0Vjjc5sNED?= =?utf-8?q?trEewTmPOrkdmRx8SBTWR4rfiW+O5fdkJQWjv8sSarj1hn1K6Ipb3CUHYeqMv9xy/?= =?utf-8?q?Wma3vjkqNlR3/F48+gxYU2YGPaPBVh5MdT5EgPsDp1ejfU1HjXWs6ofc0d/LxJGF4?= =?utf-8?q?9tLmBfIyHeWBthfO/AaDMhbJQqEhBzhtDqdlMJU4bqdnPXId1mnsTtdJ194YGtZBT?= =?utf-8?q?aYNcYU31qaJ0XKKcyVpHV9D7jY50ScH1u2TgxcQw834famFtcHIWTYLeZyn1N1ySn?= =?utf-8?q?EImVcJHLc2RvOO/g08DZ9cnDnTGK/QgRkc7yTzsx8arAj8xzab35pc1Vp5AG5fBRh?= =?utf-8?q?bQakGFY6mZuZQey8Lq4+aEex/cH6v/c917Tjll0oXq5VSQKR1EzflkMQ0re8QpKBX?= =?utf-8?q?TCs7YkwLuTC8b65X1Mw87Qk2I+W7wobccOfy3DB091Sy/BFckukQEqiVl6yeGqcCB?= =?utf-8?q?zjyb5zAbtTD3VrXMkjuQ9b9d6kx+P0Po4Y2ZRyFX3KbrpoUhnRUlwGamAG4BqKn0S?= =?utf-8?q?VEUzI3+ZRPPS4s5GvLDP16poTyigAxmQwPBD4Q4lPpDld8ZIu1f3mvoRDPeKGNWqM?= =?utf-8?q?BiRhAoMgv0eSemwvI5tEZTUjLex5SnP6k9Im7Fy+NZoZvUQ8Aea+0HnO0HHUTun5z?= =?utf-8?q?2SYpvjJbgm3cj3Aph9mjoE5ULy+VX0dY2tuxrOYVXjF8vEUz6DcYQ66CpfZFCWeU4?= =?utf-8?q?sEnvB887E6uWrM?= MIME-Version: 1.0 X-OriginatorOrg: sony.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: HK2PR04MB3891.apcprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a6abb3e2-aeb5-4b8a-2bb7-08da0e43c0d3 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Mar 2022 09:42:18.5759 (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: l6rcVb3qjdPkV6gsvktuuSlJEKs+dsX0+jFLYgpsIEiTTKRRHVKQGsJUgKOOxdrEOR3KIUALJlUC9ZIfJhlu9A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK0PR04MB2386 X-Proofpoint-GUID: 4IcTWrDZ6lfTSMUiqhfRHnO6caQvwiZs X-Proofpoint-ORIG-GUID: 4IcTWrDZ6lfTSMUiqhfRHnO6caQvwiZs X-Sony-Outbound-GUID: 4IcTWrDZ6lfTSMUiqhfRHnO6caQvwiZs X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.850,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-25_02,2022-03-24_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 adultscore=0 lowpriorityscore=0 phishscore=0 bulkscore=0 mlxlogscore=999 spamscore=0 impostorscore=0 clxscore=1015 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203250054 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org exfat_update_parent_info() is a workaround for the wrong parent directory information being used after renaming. Now that bug is fixed, this is no longer needed, so remove it. Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Daniel Palmer Reviewed-by: Sungjong Seo --- fs/exfat/namei.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c index e7adb6bfd9d5..76acc3721951 100644 --- a/fs/exfat/namei.c +++ b/fs/exfat/namei.c @@ -1168,28 +1168,6 @@ static int exfat_move_file(struct inode *inode, struct exfat_chain *p_olddir, return 0; } -static void exfat_update_parent_info(struct exfat_inode_info *ei, - struct inode *parent_inode) -{ - struct exfat_sb_info *sbi = EXFAT_SB(parent_inode->i_sb); - struct exfat_inode_info *parent_ei = EXFAT_I(parent_inode); - loff_t parent_isize = i_size_read(parent_inode); - - /* - * the problem that struct exfat_inode_info caches wrong parent info. - * - * because of flag-mismatch of ei->dir, - * there is abnormal traversing cluster chain. - */ - if (unlikely(parent_ei->flags != ei->dir.flags || - parent_isize != EXFAT_CLU_TO_B(ei->dir.size, sbi) || - parent_ei->start_clu != ei->dir.dir)) { - exfat_chain_set(&ei->dir, parent_ei->start_clu, - EXFAT_B_TO_CLU_ROUND_UP(parent_isize, sbi), - parent_ei->flags); - } -} - /* rename or move a old file into a new file */ static int __exfat_rename(struct inode *old_parent_inode, struct exfat_inode_info *ei, struct inode *new_parent_inode, @@ -1220,8 +1198,6 @@ static int __exfat_rename(struct inode *old_parent_inode, return -ENOENT; } - exfat_update_parent_info(ei, old_parent_inode); - exfat_chain_dup(&olddir, &ei->dir); dentry = ei->entry; @@ -1242,8 +1218,6 @@ static int __exfat_rename(struct inode *old_parent_inode, goto out; } - exfat_update_parent_info(new_ei, new_parent_inode); - p_dir = &(new_ei->dir); new_entry = new_ei->entry; ep = exfat_get_dentry(sb, p_dir, new_entry, &new_bh);