From patchwork Mon Nov 18 02:02:10 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: 13878024 Received: from mx07-001d1705.pphosted.com (mx07-001d1705.pphosted.com [185.132.183.11]) (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 B33C41803A for ; Mon, 18 Nov 2024 02:02:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=185.132.183.11 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731895347; cv=fail; b=j53DHQpM2kZZx9ghhlB18RTqOExVTCabmUsaB1pNxii7SzF8FSll1ACIJN5cbGt8Zqwfhc61wmSzjihY+a7dqzueSZoz11Da9duxFHbFyoiFeSW4+K9kf+75jkQK8uW+V2D7z7cWlL4+fS05lIl/VE/uNaXaRWKr6d3XpZElKT0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731895347; c=relaxed/simple; bh=PLl8M25aSQDsAJlAl4lHTZn3I21AGUq3A9ToxY+xuO0=; h=From:To:CC:Subject:Date:Message-ID:Content-Type:MIME-Version; b=p2EutrZaVB9DA1KLBqd81xVRGe7L2rVxReMMWBui8HlGD+b8nrzuU58QOqTXmsU7BeawDU7/P5VNwGfGUB2BjMQIHHNMcsnStTau+byfW2rNFExkJFokl/hbHf0iHlj+pB8eunt8aVWsU30pE+F2TCahSnCqyKUGcAv4hC1rlA0= 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=W5NF0ly9; arc=fail smtp.client-ip=185.132.183.11 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="W5NF0ly9" Received: from pps.filterd (m0209326.ppops.net [127.0.0.1]) by mx08-001d1705.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4AI0eEUX023960; Mon, 18 Nov 2024 02:02:16 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=PLl8M25aSQDsAJlAl4lHTZn3I21AG Uq3A9ToxY+xuO0=; b=W5NF0ly9g1UmuuUC28En09LsPC2OX6otb+BjQgscQLxCZ 0VCbRIaniXMj5GnVaaT1XsWzpovzMQqpdwFvQXcYX9Z2rpwhD16Ah1dAmS3iuWqm jkFyk/gB+hjD4wvWH7TjhAO85wdv9ajJDN6uOiSPnWofQUaGZy5WKZbaBfH/H9qu BsvcJVl94ustywYaSXIp1EqIFsi5lauBmUzdPyzuH1NC5cnoA/ZInjgkluZMDbNK y3CFia1uyL0RQuE8gOSCuoXnpWOJeruZTi2yefCQVhCgmXw3FAW23RchsEepelQw YadvqJwX6fy+WbNIeelExBajecPVX/KEGbpRaHyzw== 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 42xm8xh3t3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 18 Nov 2024 02:02:16 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wfU9PPRy4GxJ7LN4rmlWGfyAlpMa2nIFN/uSLj5DH9829r9mrk7Helk9ynP5s0RkuqI/jjKMKZm+MGzP0vMDWixGKIqYVELaVo8G/BzVfJHsXumqNLdLBbRRK0cEw8rqnfyGsVnTgzMYVVdTzzFXX+X0RaiIE9YhVm2PHU1Fn+Qk9PdYQp/0YKrHW5qaSOZLTWhWpZrvvYdtmqhpMPIwld4Xu3qgt/EEp+zu5Qp+mOii7S+BbqFukGeKYyNJn2DMPAWT2NAZFILGlpRbArA2wAYMnZG5nQsxokCVObDeQ55iiPBYAlTZRUbymT3mvgszmeC+o/TGVdR0GKCEnCSp6w== 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=PLl8M25aSQDsAJlAl4lHTZn3I21AGUq3A9ToxY+xuO0=; b=IBykZG9by2UvH8pUNDnQMGRrXbHuQuwEScyXhMDFz15Pr9u5cOXEq6IbpVwbdLQXAoZr5Lh7v9CQiATMi/y9T+6WiBibqZ5q8fKPrxYnhCSkJNHuxYdQU7zDGIzRqbW31equ96/hDienhvQEfyw7FEUlrFjZn5FkCM8C8PINpJjjZYqZRzKuzXhl0rWMHENXRMBR2sKqlncooUuGFgAuJO6PiH5QPxzyEG7PfsNFPXv4uK/5gZNlg8OvsADVQAD/0roK+AO18nJ3T25MYpTfQrOyjAHs0eikFCXRMltIiUwFo3RkPN9Okt3IeJTXOQNgj15Wbq1Mq2TDEQhBUwyh2Q== 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 TYZPR04MB6119.apcprd04.prod.outlook.com (2603:1096:400:258::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.22; Mon, 18 Nov 2024 02:02:10 +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.8158.013; Mon, 18 Nov 2024 02:02:10 +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 v3 5/7] exfat: remove argument 'p_dir' from exfat_add_entry() Thread-Topic: [PATCH v3 5/7] exfat: remove argument 'p_dir' from exfat_add_entry() Thread-Index: AdsAKdCLRxbAMeyARRCBbIFV5KWhHg5MxSfg Date: Mon, 18 Nov 2024 02:02:10 +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_|TYZPR04MB6119:EE_ x-ms-office365-filtering-correlation-id: b77cc207-69c8-4ccc-cdc5-08dd07750366 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?69fr7eHpi8aKabBi1ZAOX14cRSM/IA2?= =?utf-8?q?zq7DadytnqdVoijKEfPLiFKBhLCIqW1JiLNprOJlBv08GWGXq7c9XPvrmWGnbXa5X?= =?utf-8?q?TQovNGcRX5tj5wDEu+VMCQ/JHBWXOE1tVjxUMHH5R5O0mlhDi107jKN3928o8fMOc?= =?utf-8?q?ZBDdalgfnvc3iwIM4+cmk74J1KVA3X5iwi708dpt6TowCaCKGoMr5nJXVYc+EeODZ?= =?utf-8?q?OLVzpwG49r/Os9/Az11iHZyAIjBQJ7wsFowruXrVQkiv2KHySvUbaRQTdBB8elISe?= =?utf-8?q?R/rJ7A27Z3XNSbTzZ0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sNQOMtXIyFspKIA+JBX+Blx4CAUe4S?= =?utf-8?q?DmPomW3WmAzoi7PvpWOKJLCfxQbXRaKVDCRYHtBx/E6LAJweDXMCGFNoKD7L6ohwD?= =?utf-8?q?xKh60gdk00OEwYD2n5n3NQOpk0UVf687Jjrl/JxqOQYkLyYH3s5Maz7w=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?vTVq0fn4+uwW6eDJXeNaxn3itgyr?= =?utf-8?q?JEE5hXpGLaCmiBI69syZ29rFR+MDcegOamzCor0qj4yBf44phA8I1bBp8kAcX7RG4?= =?utf-8?q?5xE5SkDWhYG4FVukuYJEUOKmj9tNkRYxDNumZBdxdeCg+uf+JfEzB6lNDZtEsp2Nb?= =?utf-8?q?Fcg7uimRPs65UOPRgeOwyMzZJNqPlHfK57BI6YiHv0gavX+WQ3ie9P/qhCOw1FtjZ?= =?utf-8?q?ZaJMuYIydCfSYBOfHk5oULooIBlH++5gTk1XR2ibVVMO7X/qUXK7IxLw5kRL8lu7B?= =?utf-8?q?1Cx5MHIz68sMNkjladCaImzQAue0cpGEWJFXeQJBy0rb+KMswtRGt6mebECTRsDN5?= =?utf-8?q?JvE2vyBBEKfht8z02ZHr94yBri1i8z5EddVH0YQvsAgHGXX3DjdMuzUtGt1LW0MXd?= =?utf-8?q?8NMNv7TIQDcWPOAMwXSkSAnIRk+IhmNBDyfrCtT3Pyyd5oIgWPdLgwfVIibDIOV9/?= =?utf-8?q?YiQemWfRkNUuysCIlvohOeQdhq2nQVrZWvGB+yJ6C6J0PUMuuw6Ox3Lpfc+Eyb/NB?= =?utf-8?q?rLSOToVIClWvsSfZRH3cm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eeXCFelbC782U0lwe4lzFwLsSsCsSrTMkraimkfVI2oL4C?= =?utf-8?q?ribmPq8PYkMyNb3JEVtQLZhVENnJXIJh6nH20U8qwZ8f9YCKDxx+C5mEROwADrnXR?= =?utf-8?q?9RTewvsbdxOm?= 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: 2AaRp2dp3AnlCHSJksaDFomTQ08kCev4ZNJROQUMsCKGoZP2cs/aMKC9ZMjPXsMFuuMugirAtqUpRbqQVdhZP2BZrZ0FvK3H4PR8cLNOO+z37QzjP5UVNnJGtsdaO0D+o/B5clPKvHwifXYKlobaYogTgRf+NNDQL1cHJnpX3mlDXS41MdM37lv3U+JmH/6/NDrm2MJKeTlGHYFTIXHzIedpLXlcfymZ0SwFB+M7k+T1x56C7OF+TIskzXTtnfN3kx63rSDlCP6MsCBEoocaOMtA87wdie2uxn/FMRihkMvrt5sVDhZb3tKBquBBAijurC/d9q5rS2ENoDcu6GW0KFHP86oSZU7YfYnbQHZumUKn8OewsHPUR8tejvN4UgVXpkIIhpqe2U6gFP3x+g9hIcIouFmyPvyz7/DHSPhTQX/2N/BUOEnTtaDQ9d12OX9kt6fjJI4SecIkWVoppgGH6KvYEEuW+79UpNcN1wnWwPhSc5f8XUqoX12k1uV1tcMcdwFvs3WkGZl9pdFY9Phxn7xOKQsbNSCesQgJ+CHiw/TrlibVC6tNgniSQQSzE5oIyW4t8NkhDlkHwz4pZcQo6/q/P6uuFAdLFVqBiq8EUZwYRJhAifBwqQTGjDqYn1Tp 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: b77cc207-69c8-4ccc-cdc5-08dd07750366 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Nov 2024 02:02:10.5751 (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: kLHffXA29zCKtXN6fdwe4jIdH7KJWBZnDL2nBxbNZBhKTMTsD8yjCUhGmM2L6nDxj7LVwN1jKis7wDWxLunwbw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR04MB6119 X-Proofpoint-GUID: Mp1RsHqlyR17NY25AC9NkdxEuANwdz_N X-Proofpoint-ORIG-GUID: Mp1RsHqlyR17NY25AC9NkdxEuANwdz_N X-Sony-Outbound-GUID: Mp1RsHqlyR17NY25AC9NkdxEuANwdz_N X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-11-17_24,2024-11-14_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 d6ab4fa008c4..83786938f06c 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;