From patchwork Wed Oct 30 06:12:17 2024 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: 13855956 Received: from mx08-001d1705.pphosted.com (mx08-001d1705.pphosted.com [185.183.30.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B99B1D0F47 for ; Wed, 30 Oct 2024 06:12:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=185.183.30.70 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730268762; cv=fail; b=C5qE310JKZsCOgMtgA2SBKTtSKWqrnVvJNMJuyzM1S98XXlHloZvJwtJ2WENJCZSC5BO59TWyoZIbheOY11Qoae1Z1CmI0qrt8Tw9uS9LQJJi/IKvTj7UyqS2SN6i9T67ElHp6Ugkz2UXl8LLge/90OLi1w1qwHNUd4SlTN5Y6I= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730268762; c=relaxed/simple; bh=Dj9oV0VufnK1f62WhDumq5kse5Jw87jpIybm0DSdcrI=; h=From:To:CC:Subject:Date:Message-ID:Content-Type:MIME-Version; b=oDFuNm+yOcwFp9HojWU7zW8ekoSXjROZ0nMLJyxY671yj+jYoeMLKxdABCIOpkUmhp1ya+sKpMLM2SzGu76MV5x9KwrIiIoGO2IiKUojBvSOguDHu00pV0ZZbu2BgXZrNPAG89kAcbGupFA0VlOn82O6widxyzWNslApyClmxnQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sony.com; spf=pass smtp.mailfrom=sony.com; dkim=pass (2048-bit key) header.d=sony.com header.i=@sony.com header.b=kh/OG7Nl; arc=fail smtp.client-ip=185.183.30.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sony.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sony.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sony.com header.i=@sony.com header.b="kh/OG7Nl" Received: from pps.filterd (m0209319.ppops.net [127.0.0.1]) by mx08-001d1705.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49U4mBsl001183; Wed, 30 Oct 2024 06:12:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sony.com; h=cc :content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=S1; bh=Dj9oV0VufnK1f62WhDumq5kse5Jw8 7jpIybm0DSdcrI=; b=kh/OG7NlifEuhoebDvGidbOXlJMOhGmz6wTSvHPmejzPe OV5e9l8ugtGrQvg7bHJNdzGfrhpCC8ilVYoYpq6I6rpXpbIxfLL/fVqDP96dm/Sh yEGop/vItXrdo/VHkSB2urRhSrU5AkijeEmbJbbGRjlKnHBifgDuNc6o1EdwNhqn KLPDVUdGnAeSTBJgISYh19oz/AR9pChqEhERWrZ/MAQk6RcJ1p8agVS5U+XKXIAj 1zCx5vOmr/F5aEvWB4+gHdRGW91yOHjyrmdtP53+TW3pv0r7vmdvjT/kdXfrQSe1 RvbyfpJvQbvjVLM2bkTFejYwb1vNJN4mWcnmg52vw== Received: from apc01-sg2-obe.outbound.protection.outlook.com (mail-sg2apc01lp2113.outbound.protection.outlook.com [104.47.26.113]) by mx08-001d1705.pphosted.com (PPS) with ESMTPS id 42k2yq8hy7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Oct 2024 06:12:24 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NOiOevqYX59myQMdySAIh9QaMxDDhE+JFPOTErEfgJRcEedLq21BHzfmO2kF2FKvy7mPv7WtWJm2oR5ybG/28/RyYTYWEdfveI4vgSA/QZCM+vlDCrJXMNVghucypvA1I0yZd1pv2/CDfp3yMc6KZSUeHTHpzvxe6qfSVSnFL0Od081wEXEeIWZtkDWUvd3JPcF94ziZKI+OGXSr5jbsMDfWQgU6V4KkGd6MRuJbjtQ4BIqgNw3Jq9hLWbmf84LdK6DQTBPSrp4NRsEdzTOa786gNqG22tgQFDqWsKR4O8azGzZ5d7PfZeRxtJ4ArZkYPjH1+Mccd6bhtBlWlJTypg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Dj9oV0VufnK1f62WhDumq5kse5Jw87jpIybm0DSdcrI=; b=VmA8WwIFGbZZT34GQb9Y3k6+R6Ek3RusItebvZoC2hG9jH2NR+nxC1ib9FGNE7vYCgTUVDUltCeVs7n0URroslVLYQd55diwWjriz6WCH1Ng+0SHkK1YfKBouI9xO/FD+DgSQ8bT1ey1b8htGh+MhV6RS/0apBt87TsrSJL5o2n+J8JmIwtWH7V2mqOe3So/MhxIl8Xht4SZaNNVhPg7WeIBreo/F48sy5XKrSEBbBMsCA1/fP02Vfl75h758DdT62fgfFSOK49ZlERsDJY5e6QnmS2zOoiLIg34+eGPWZqutaYLvQlu4ePXR81WsRZj+XoeI4VngHL7J3tkLZeqZg== 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 TY0PR04MB6268.apcprd04.prod.outlook.com (2603:1096:400:266::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.27; Wed, 30 Oct 2024 06:12:17 +0000 Received: from PUZPR04MB6316.apcprd04.prod.outlook.com ([fe80::409e:64d3:cee0:7b06]) by PUZPR04MB6316.apcprd04.prod.outlook.com ([fe80::409e:64d3:cee0:7b06%4]) with mapi id 15.20.8093.024; Wed, 30 Oct 2024 06:12:17 +0000 From: "Yuezhang.Mo@sony.com" To: "linkinjeon@kernel.org" , "sj1557.seo@samsung.com" CC: "linux-fsdevel@vger.kernel.org" , "Wataru.Aoyama@sony.com" Subject: [PATCH v1 4/6] exfat: remove argument 'p_dir' from exfat_add_entry() Thread-Topic: [PATCH v1 4/6] exfat: remove argument 'p_dir' from exfat_add_entry() Thread-Index: AdsAKdCLZqiXRnDsTO6ekxDSVI0J0QqZ/fqw Date: Wed, 30 Oct 2024 06:12:17 +0000 Message-ID: Accept-Language: en-US, zh-CN Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PUZPR04MB6316:EE_|TY0PR04MB6268:EE_ x-ms-office365-filtering-correlation-id: 11718297-cf8a-476a-1cf3-08dcf8a9ce49 x-proofpoint-id: d8690225-876f-412f-87c6-a7cb45557a4c x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|1800799024|376014|366016|38070700018; x-microsoft-antispam-message-info: =?utf-8?q?2FnRG9ZsB6vnOcCt7P6rstdlXvR/Sg/?= =?utf-8?q?xzRwlL4kxqO+6kRkvh8bcder70AM8PiIP7+zvdxJNc7BgHH481Aw9c4lc5ml6sClP?= =?utf-8?q?E//pkvFEzg8SlIFLmha6HbDtxbOGKkEqEJiJAy2qaMwm3H4rkacVJZXGzAto+x33s?= =?utf-8?q?S4PrYZUZW8jUcXPQfGZlxVcQeY8S1TBa9neybQ0dvF5fGqlCplOCp1BG90X1QpoQf?= =?utf-8?q?zAr0/L7XQTOoRtKIDukgcIEuq/5aAD2yKRZrey+RRSO0qkmztoHAk5NTKWCxUgtUY?= =?utf-8?q?4v1D5KGH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uLJiV6BEfI63w+uRUuEoMjjxhhJyd+tSoP28Srgp19gOiW8VpKgKNucjX?= =?utf-8?q?8D+0VJpG8OZQYRjNtuSwx/jJAq3DlqfdQ2tOPgpCu8+UIGlP/wqr2hm5jvsi3SoWN?= =?utf-8?q?5JClH5uvRpRs0dcFioOnlsVzthiSZJ/B43NQ7BdBUJqLyhdbxBI9hqbI=3D?= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:zh-cn;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PUZPR04MB6316.apcprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016)(38070700018);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?2TE4ieIewiR1odwreVKHXxtzj5cp?= =?utf-8?q?7gFi/gWp3KG9omWJ2ptPbzyn9njd/urNMM3fUKZGQJwrS12MnclOMApehAnuvPeXD?= =?utf-8?q?9LTq0F39uPdDJg7wG7GsAZSl07C3Is/4gKLp16c/QRAnh5s57EI35t79Y1pyLyMDm?= =?utf-8?q?mA6GkAAODqfHc+UNeKWLYg+G5q7fz/q8dCO6Hb6SdSKuvjqHeqm98c/XOxpjWXlxn?= =?utf-8?q?vvZkpqPYIH2sLo33Ax9FizsSOMEfp3GeubbU50Ji7CmDQVNvCurEkMQtwEn+Wne9+?= =?utf-8?q?xrzxaPulxUHmYdWhIqhLMl3WsSCCvZQViNuV07GXCpWlCshPgwna3aRw9TjEHDQXF?= =?utf-8?q?b2uKCDUXrAykgToBFtLpLaD6sn8me/Pz04wjM1mG5fziGD/xKCA9ZGwGJfCH3G7dt?= =?utf-8?q?PaSIsdqJVahMx5PYm0p/vq/uLAQTUMBvL7x1+OyMd1KrYkaOubSSalDPkXKi1uXtL?= =?utf-8?q?0LPfYhTVDz+LU1WBMCEDf+TqkBTL+Qg2Y+t3pcyVO5EEhZ1nrUJ2ay4gXEMG9ankE?= =?ut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-8?q?RADEslpP1c72OEyixUVcf1T+z8Qfd06RTxJoc+b3uGC5ULiSvyg85tWgnQk+XIfRx?= =?utf-8?q?2qmw21PwpNnD28IMwYSyjggrln0VXL6auTAlrteoEcTSQK+KZ/8bT3meA+zrOtkGu?= =?utf-8?q?+qNb7AAiz+rO?= Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 9HkdL5U+2/SRkUD8EGaZFQxB6eZ+181tZDLF3sAxhcSugOlabn84+udbZFtGNt8I49etuQBUrk+C48RA1CrCODQ8CjsTyieQD7skSUgsNkx606YzVuWdxG4uRvh/1/zWj4ac9fpgv5DWdlp0Lqu+9xx4ZASrNHbDNYwI4D84hDuy6OzaYY59vmAI0JRdX9LPjUxq90vdE3U8DD6XljKGxqVkGBWjCKORbNvcIdUKHqtvygRgSqbADuCs4f9Sd/1JvV5AD5ynpL9fwwXZDGcRcEe9Obfr+IFS3b0upo8KLSqf3qa+Gt9dW/weMuz43x/KqYfiIsqxz3vQyDx0q3tG/oRKV3mbQhx4TF2ivbVfpWTzp/vqQyRNEinwgGQVK8QIl4TmmWESZf7nVzzxNSnNOpLGFLAgwfBvPBPTBPyzu/WqJS27410EZtR+xyABwus3CZFn9iAEu7JuWTiA3X14a027uPW6B2Ptdo78YgCKPLuJKBqbfgrjo3keqK1E8jRqpCEYW7TNs6+Ydo3JaLqHdBBMWI7MvhDhIDG83Yax3Hj2kReKsyb+y7VoHxjJN8XuGIB19k8d9tNFfL0zhlBeQ1+XUQqfC2VIqfSEWalkHNx6wKviZCauGf47V9fvVaHx 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: 11718297-cf8a-476a-1cf3-08dcf8a9ce49 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Oct 2024 06:12:17.3372 (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: Ms7B1ehGgl7Q7MDuoiGJFphLNQ1Ihxu+Vd4QRpRQMC+IacirWM88iRhLMi1ckwJKQddnPTE9l/LglFkrgXSryA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR04MB6268 X-Proofpoint-ORIG-GUID: e0bJuBQhPTgOg2sYam4I48_ufhxpwInl X-Proofpoint-GUID: e0bJuBQhPTgOg2sYam4I48_ufhxpwInl X-Sony-Outbound-GUID: e0bJuBQhPTgOg2sYam4I48_ufhxpwInl X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-30_03,2024-10-29_01,2024-09-30_01 The output of argument 'p_dir' of exfat_add_entry() is not used in either exfat_mkdir() or exfat_create(), remove the argument. Code refinement, no functional changes. Signed-off-by: Yuezhang Mo Reviewed-by: Aoyama Wataru Reviewed-by: Daniel Palmer --- fs/exfat/namei.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c index 90066d8ec9a0..39297d449dd3 100644 --- a/fs/exfat/namei.c +++ b/fs/exfat/namei.c @@ -452,8 +452,7 @@ static inline loff_t exfat_make_i_pos(struct exfat_dir_entry *info) } static int exfat_add_entry(struct inode *inode, const char *path, - struct exfat_chain *p_dir, unsigned int type, - struct exfat_dir_entry *info) + unsigned int type, struct exfat_dir_entry *info) { int ret, dentry, num_entries; struct super_block *sb = inode->i_sb; @@ -476,7 +475,7 @@ static int exfat_add_entry(struct inode *inode, const char *path, } /* exfat_find_empty_entry must be called before alloc_cluster() */ - dentry = exfat_find_empty_entry(inode, p_dir, num_entries, &es); + dentry = exfat_find_empty_entry(inode, &info->dir, num_entries, &es); if (dentry < 0) { ret = dentry; /* -EIO or -ENOSPC */ goto out; @@ -503,7 +502,6 @@ static int exfat_add_entry(struct inode *inode, const char *path, if (ret) goto out; - info->dir = *p_dir; info->entry = dentry; info->flags = ALLOC_NO_FAT_CHAIN; info->type = type; @@ -536,7 +534,6 @@ static int exfat_create(struct mnt_idmap *idmap, struct inode *dir, { struct super_block *sb = dir->i_sb; struct inode *inode; - struct exfat_chain cdir; struct exfat_dir_entry info; loff_t i_pos; int err; @@ -547,8 +544,7 @@ static int exfat_create(struct mnt_idmap *idmap, struct inode *dir, mutex_lock(&EXFAT_SB(sb)->s_lock); exfat_set_volume_dirty(sb); - err = exfat_add_entry(dir, dentry->d_name.name, &cdir, TYPE_FILE, - &info); + err = exfat_add_entry(dir, dentry->d_name.name, TYPE_FILE, &info); if (err) goto unlock; @@ -819,7 +815,6 @@ static int exfat_mkdir(struct mnt_idmap *idmap, struct inode *dir, struct super_block *sb = dir->i_sb; struct inode *inode; struct exfat_dir_entry info; - struct exfat_chain cdir; loff_t i_pos; int err; loff_t size = i_size_read(dir); @@ -829,8 +824,7 @@ static int exfat_mkdir(struct mnt_idmap *idmap, struct inode *dir, mutex_lock(&EXFAT_SB(sb)->s_lock); exfat_set_volume_dirty(sb); - err = exfat_add_entry(dir, dentry->d_name.name, &cdir, TYPE_DIR, - &info); + err = exfat_add_entry(dir, dentry->d_name.name, TYPE_DIR, &info); if (err) goto unlock;