From patchwork Tue Dec 13 02:36:55 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: 32598 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2593450wrr; Mon, 12 Dec 2022 18:39:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf4EoZELcuEOjaaktats/35+AF9NgU/s791rD/wUFJJ1ZMeFJBckPjYB2FXOESewDMV9aHO8 X-Received: by 2002:a05:6a00:7ca:b0:577:3944:aa78 with SMTP id n10-20020a056a0007ca00b005773944aa78mr16861489pfu.0.1670899144681; Mon, 12 Dec 2022 18:39:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1670899144; cv=pass; d=google.com; s=arc-20160816; b=DfquYD2iZcHIy2dEtuCOKX3H+TZW1svBlLSR34QnyQT9WDoVVKlLdN5cGs6xyGk/Js Wrfubc1ZRI8Nc9zDl7JkRWSqNFnqNp4O+7h0SBEnpHPoZhQffhS2hGmAd7PXnIczhf+E UjVmZGn6pD9yAkYm7bLFF7ZbR3a3cqCWYUFtdufJDamZGUcTUx2BxChmiR6h8+Fc41E8 4y54nprvE0QXcubmcjSL4TQ0+2k7VB/XP5HSyavV+g48o7tbiZWIxXbwm6P6Jhif01jY +zB1vinStxV0FwL05KOk9H2wFSe8O3TNpbOxAI+/seWf8MH8N8Y+Urks/RI/+RGekzTf iJ5g== 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 :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=iBj07h2SdMFEsf8LZAE/mWaTKdfHGp4yQIyyvjn2Kdo=; b=sEYFbtiTcUzwhl5crLX+aGAomeLjVWPn0czInJNoIH7kRYHEqxphkbXSNzCLGd6a6R msdNMtxqdWgPb8cIh6guwR/cXktFBBk5AuIV7jCO6FaRo2doBrqxmAS3DvOwJi9WVV8u S31plg8gBcNk0mCArXnA5UhHpE/L7XMNBDY8RXNxf/+dOtkfQ7tV55zZgrojACWYIRzq EMFQMUXe7Tu/pAcIB4bi8Uujp0W00kinQfhaCcGv2TAGCjm7SVNnYHVyYNFdc1QNjTBf 2EucIXtm/GLtgohfnp4S6ZgBPNDcbIwVek2B80fdas8lhBuUgZPvj3ZpVROagG16ULEr EE7A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sony.com header.s=S1 header.b=Vb99SBR7; arc=pass (i=1 spf=pass spfdomain=sony.com dkim=pass dkdomain=sony.com dmarc=pass fromdomain=sony.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=NONE sp=NONE dis=NONE) header.from=sony.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d9-20020a056a0010c900b00576d16ade55si12239248pfu.35.2022.12.12.18.38.51; Mon, 12 Dec 2022 18:39:04 -0800 (PST) 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=@sony.com header.s=S1 header.b=Vb99SBR7; arc=pass (i=1 spf=pass spfdomain=sony.com dkim=pass dkdomain=sony.com dmarc=pass fromdomain=sony.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=NONE sp=NONE dis=NONE) header.from=sony.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234379AbiLMCiZ (ORCPT + 99 others); Mon, 12 Dec 2022 21:38:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234180AbiLMCht (ORCPT ); Mon, 12 Dec 2022 21:37:49 -0500 Received: from mx08-001d1705.pphosted.com (mx08-001d1705.pphosted.com [185.183.30.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A57E1E70E; Mon, 12 Dec 2022 18:37:13 -0800 (PST) Received: from pps.filterd (m0209322.ppops.net [127.0.0.1]) by mx08-001d1705.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2BD1YF55012328; Tue, 13 Dec 2022 02:37:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sony.com; h=from : to : cc : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=S1; bh=iBj07h2SdMFEsf8LZAE/mWaTKdfHGp4yQIyyvjn2Kdo=; b=Vb99SBR71tBj5P2x4EVBnpt2G1zmKK5RQGup03t/yHWHqmnuJdpUncIf3E/EEWIY9LcE fNBsVsVWZsuy2rYLrDDc644twpqSiAqkvJWgS42RjzTwZtwWL5iNHQ7bxZE9drcDa8a0 oMPNgSEFhhmYXgEayqANVlmls4NPVWsybaX+4zW0hjDiETc2xA7qE9GkdMUJ6eKlUxiz ghlI3D/py4sefSvDZoggXAAcS/4UqojGs9AySh1MTKqGYc0qnLtlpxbHzhlyW+bOQ1H9 Cxp6TwK405qKAsEoYz4C7M6Rs4CJAluCs8dF7hSCO0UXQ0X/6bAppkE+4gOaXDrhXHyA pQ== Received: from apc01-tyz-obe.outbound.protection.outlook.com (mail-tyzapc01lp2047.outbound.protection.outlook.com [104.47.110.47]) by mx08-001d1705.pphosted.com (PPS) with ESMTPS id 3mcgw7th26-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Dec 2022 02:37:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G7GKnZzsYfRnIvUd1T8uGfScWB9KkSoxrXNgZXQ2bTbJPhWklbvk1RHn7nuVL4In7KVZ5q8qN6wKO7n7hAHeLtD8MQNP0vZ/7qMdWpOt2Tyy1TqUwXgDDX0SvRaDgHprtHM/2QjqEqi2dyXwgm2wqt7GjONEjccvf9Aj1zYJ7V/q8UlByIOTa6G0JXq76aZ6Eruvm7531pxosgTzpkeh+e18UGCSWEHnxlCZA003mnf+zju0pOMA00L4c5QyXHGqBeDlKL1dWSkTOPwO2ccD9QIJBK7zpMkYRoUxEY22hmaVUFFFBXzujd3mQv8gWy5FNMVel1ikzctMN/mNKybnQw== 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=iBj07h2SdMFEsf8LZAE/mWaTKdfHGp4yQIyyvjn2Kdo=; b=MvqkuGIwjawTjfwJPjwJvOMvBrgB4QKBuvw/U01OTPrU2dDrCKnYXBnAx9Et21RqnD8ONf0jE2sE2WuG8JepYsErAnn4UG0ncA0EMBr2or9iuKIPgetcCdMsoUK7IT7i71yZ5lIHEQSyEBbD/Un+TwTpAoX/ZTq34b0n6lv4PauP5bv1LaQfx7/0/vKh9KBNm0utIMMISCeo3YcWlBDyQto4efZIX0qo14vmuONqSubSCyzQZdaf3nVcEFmctsiRMPm7UoGqcG+uJfv2TkQPGpFShcRCLQBZ74piVZFgqRqWgRtMrmk5Ba/I3hRwbaQob6IMXfcof99itNtGJTrZ0Q== 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 SEZPR04MB6948.apcprd04.prod.outlook.com (2603:1096:101:e1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.10; Tue, 13 Dec 2022 02:36:55 +0000 Received: from PUZPR04MB6316.apcprd04.prod.outlook.com ([fe80::c689:d665:b3a2:d4de]) by PUZPR04MB6316.apcprd04.prod.outlook.com ([fe80::c689:d665:b3a2:d4de%7]) with mapi id 15.20.5924.009; Tue, 13 Dec 2022 02:36:55 +0000 From: "Yuezhang.Mo@sony.com" To: "sj1557.seo@samsung.com" , "linkinjeon@kernel.org" CC: "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Andy.Wu@sony.com" , "Wataru.Aoyama@sony.com" Subject: [PATCH v2 2/7] exfat: remove unneeded codes from __exfat_rename() Thread-Topic: [PATCH v2 2/7] exfat: remove unneeded codes from __exfat_rename() Thread-Index: AdkOmaed8wnUZh9jSXqXATN8Nxo26Q== Date: Tue, 13 Dec 2022 02:36:55 +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_|SEZPR04MB6948:EE_ x-ms-office365-filtering-correlation-id: f68da264-21ef-4b1e-0704-08dadcb2e686 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: sDfLlNZwzDI+HRQYhs9jVeSWEf9UBV3qTiXOAZpEj8xEWajvakEiml1KTAZ5b6fS/KdJ/Vx1U96kNfV9guoBtJoK2rz3egoccO8qvPQgfZCYh4WWZxsl4YnWPISse1BB3RBBgoXCavpjXtSkybz3miQl8n34tYmw3ARznYrP0p7WFyZfr0eM5S9DUZGb1ZrnAib/hkwXbl0jt+QXOXkU6rj737Bd98Gto1z9FPhii5OdJ3bjkE5zg9i2rD+kUivkk505NSvO7TXgro8bm1zf9mg0f8pLGRkQO3hInDfc4ayadkhOzF6kkv9jtDJeat0GuuQV3EScd/1Y/N0OfG5YtX3hUeEtDpCW967syjdC9jsoZ57MO8WVCJv1wq9TOXX+xSOfTQIU1URTLbRoiXxzB8PM9QwP9/HQW3sAFYY3Q+XOXrg5qt9V2f9VfU+QrqI2BdvQcIZSNPPw0kD4DKRsxl5DAzM9ozkCV+dv/6I7F/NYQYUTRxOS6NCJdj3bvc9qkitAbjlFtuaUTwrPhQ2aSuCpu3Y+wBz/dkEA5OU0seE8Mt328w6Rl35HUUIXVrquWB7kCS1w57dRK+g+28tTk7jQrdoAzQbGEn5CzYff7Za7xLFtwo/QfTKpYZE23r9VqrzPB9TWmMP54gaCbd+f2evgIbu8xz5ltBJ1D4S9iMJhegOLDx5dxBnIoXPYjmtYbX8/nktsd9v2trFkz0eLqw== 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:(13230022)(4636009)(39860400002)(376002)(136003)(366004)(346002)(396003)(451199015)(86362001)(82960400001)(38070700005)(2906002)(8936002)(4326008)(8676002)(66946007)(66476007)(66446008)(64756008)(66556008)(5660300002)(122000001)(38100700002)(33656002)(83380400001)(478600001)(110136005)(316002)(54906003)(71200400001)(76116006)(55016003)(52536014)(41300700001)(6506007)(7696005)(26005)(186003)(9686003)(107886003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?5Sn0PavLwvXSxpwkK0u5qZl9fDb6?= =?utf-8?q?TKJ7eqL8w8TEfiRSlsGQwvHBn0OGU//d6kAGsdaffHqKInwrUoPfd2CmeQmTR7WEc?= =?utf-8?q?46qRBVIM8OYPVkPdCqcxLDp7Xd5mJWcSwYm2zB7HtgO4nkcdHPjspM9vTohXcQZ21?= =?utf-8?q?WDvyQWhYOqagoIB3q5mXbEI+z8II/5mtRkN2amPegGcAURUUtriRpGiRkQgJKQ706?= =?utf-8?q?hfRUM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-8?q?4w9CLm6ClpIvdkf8jLeXPcQ/YkGrJYzffLQwIvuEmIXp2j1OdnxYVH09brcJGzS7l?= =?utf-8?q?sAUB7WQPO+qz4MbVg8t7Wk+63hzWbtor9lVJZIfwL/wL87t8ZtEO6PYyFaMK0ewRi?= =?utf-8?q?OiqwfA9E7cS0UVScLjrnCKP3R5xHn3MuhFVbqWcVo0/lDWvqlrNYn6NH6lnsDeiVr?= =?utf-8?q?M7ZEgjbLdoLKONocJoiQ5E1ZqTXWDXYM4i8G7pRTKyhTQgIMGknpdi6J6G+BzggLp?= =?utf-8?q?AHEaIoDWgl6jVqCwMt1q1x+v+FUtrD0/IejUkGdbNoWMrGQs+ubZaEVdyRJvahRPn?= =?utf-8?q?5eBBdOuuEGDoWuc/UhfrO66CTyV/EiKD57W/C8g6P+lp14c8182ZZUo4Cpvj8MTkD?= =?utf-8?q?sR/AecGB3Fgp4tHyiOsbfZDjaV0zwk5dNBHhT2iduIc8oKqD2apv0EvdYlKSKnBpP?= =?utf-8?q?Q6ae5e7/1Nuu?= MIME-Version: 1.0 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: f68da264-21ef-4b1e-0704-08dadcb2e686 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Dec 2022 02:36:55.5710 (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: /qkwMK/XJChcas+xCqCBORCMA8OtLB+f2PAmv0UdRuc0MN5+l2vDwuERnCR56Go9NtzhIm+0BeRE+6CbAHWpWA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR04MB6948 X-Proofpoint-ORIG-GUID: wMBJregojqql3Fwa1t7V2-leddumCxAq X-Proofpoint-GUID: wMBJregojqql3Fwa1t7V2-leddumCxAq X-Sony-Outbound-GUID: wMBJregojqql3Fwa1t7V2-leddumCxAq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-12_02,2022-12-12_02,2022-06-22_01 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE 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?1752064741101591991?= X-GMAIL-MSGID: =?utf-8?q?1752064741101591991?= The code gets the dentry, but the dentry is not used, remove the code. Code refinement, no functional changes. Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru --- fs/exfat/namei.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) -- 2.25.1 diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c index 01e4e8c60bbe..347c8df45bd0 100644 --- a/fs/exfat/namei.c +++ b/fs/exfat/namei.c @@ -1175,7 +1175,7 @@ static int __exfat_rename(struct inode *old_parent_inode, struct exfat_inode_info *new_ei = NULL; unsigned int new_entry_type = TYPE_UNUSED; int new_entry = 0; - struct buffer_head *old_bh, *new_bh = NULL; + struct buffer_head *new_bh = NULL; /* check the validity of pointer parameters */ if (new_path == NULL || strlen(new_path) == 0) @@ -1191,13 +1191,6 @@ static int __exfat_rename(struct inode *old_parent_inode, EXFAT_I(old_parent_inode)->flags); dentry = ei->entry; - ep = exfat_get_dentry(sb, &olddir, dentry, &old_bh); - if (!ep) { - ret = -EIO; - goto out; - } - brelse(old_bh); - /* check whether new dir is existing directory and empty */ if (new_inode) { ret = -EIO;