From patchwork Wed Dec 15 05:12:38 2021 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: 12677341 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 17254C433EF for ; Wed, 15 Dec 2021 05:13:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239837AbhLOFNK (ORCPT ); Wed, 15 Dec 2021 00:13:10 -0500 Received: from mx07-001d1705.pphosted.com ([185.132.183.11]:56444 "EHLO mx07-001d1705.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231436AbhLOFNI (ORCPT ); Wed, 15 Dec 2021 00:13:08 -0500 Received: from pps.filterd (m0209328.ppops.net [127.0.0.1]) by mx08-001d1705.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1BF4jxQk029075; Wed, 15 Dec 2021 05:12:50 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=uh5yDYkTpbVTe9QhvTvqoweefZyALrOKuvQqzeKT0kc=; b=gLDIfvNyZTedOjMqBX7c2/HJfinJNXowdYv4SGYqy7jjYDC/wZOYhVOcxrB+rUmfgPya U1Nd6sQ15mPDIEjZKW9KDO5dq1fS/QBl2gXmYuz62f1j+kvPH4+H1o0MDi+yHAHKOKaX xU3ENa3KEbsqCvv/3lN74JRkUlj08M0z/JreEo2RXQTZOFgekDWDWx7ugpVIbatCjduf izd1IYhhAGeUqKPO9CI/pSExhnhDo2myMFnmdRnGGwJ1YU2gizz6A/GUsjK7E0ndPnox lBPiikYRrxbVMRdowS/4Bd6cyeTJ3Q3bQ7bSUq1vrqdizssdfXpRz6IbNrlLlUpDwTPB Ug== Received: from apc01-psa-obe.outbound.protection.outlook.com (mail-psaapc01lp2040.outbound.protection.outlook.com [104.47.26.40]) by mx08-001d1705.pphosted.com with ESMTP id 3cvn5m2s6h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Dec 2021 05:12:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ejUL618GMyoyvrvY2IBIqvDH/TviPWFx1ireAvcwxpLKi5R2k92bXWIW5dr+uyvd5fsK3xKTqSECUz6koLHZkgMFBG5y19e3MWLMO/aFS7/RvCGI9ecRcIk6iSWNm5Qds4v4JGWIKYMmOwS+Eb5RIJ7uCizbvCS05F5JRVjwznEhR9RUCVPQF9jQwTpncPVEPis+PLaMluWwaMORN60za6GgR/o+Mo1AD6bmGahtplJFILkeqSf+CPvM0XTOjdQzbLVCDCvy7v6XYjCMpdeFH29hqdWt4LuWiiYUfDk9aWzYx48iMtKEkiwLjHilSeJ+Wks8Q1nFSAh1AOm5TKRMTA== 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=uh5yDYkTpbVTe9QhvTvqoweefZyALrOKuvQqzeKT0kc=; b=eCvxHhlSx+71A9et9x9b/WN4hkSOgQTJAxP67Lu6IyYpq2AN1e788AaOXnr0Q0i7/xKzk5mvhyCV+0j9apJ6kVfE9vcJaIA+o0ePvYgrnPy1bsTCAhbJ99AX7Sgq8obEirPVtySzFDtv8XMjY0pDM2nMnlTygCIrAgU3JZ4FJBiIWV2HF1LXIVjh5zvTYKoQd5GG+KJgNlKIpMXCNzHM7y5F+A/8mEBj+C85vP7Hm3L6IgoiELMh5AGXomnEwuVXQaHl8GMq2viWL2/f6dYseLAoKxeyQxaSZtVpRBtBGB/orWGbcW01ZfoP9/y5BCSCYl9EwWc6qveSIANhEOHbxw== 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 HK2PR04MB3585.apcprd04.prod.outlook.com (2603:1096:202:3c::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.16; Wed, 15 Dec 2021 05:12:39 +0000 Received: from HK2PR04MB3891.apcprd04.prod.outlook.com ([fe80::98d0:88f2:dfa9:93e]) by HK2PR04MB3891.apcprd04.prod.outlook.com ([fe80::98d0:88f2:dfa9:93e%3]) with mapi id 15.20.4778.018; Wed, 15 Dec 2021 05:12:39 +0000 From: To: , CC: , Subject: [PATCH] exfat: remove argument 'sector' from exfat_get_dentry() Thread-Topic: [PATCH] exfat: remove argument 'sector' from exfat_get_dentry() Thread-Index: AQHX8XBa71IUEcVNJUe4HwKqFnmS4w== Date: Wed, 15 Dec 2021 05:12:38 +0000 Message-ID: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: suggested_attachment_session_id: f4c28ac8-0097-a718-655b-fea97bcc4e56 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1a8c6f70-9562-44fc-1a61-08d9bf8983bf x-ms-traffictypediagnostic: HK2PR04MB3585:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:74; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: QfOXwTfGUPlgDKeEv+7D3t9C3XJ5mHln9Os7T98wJ9T1mRMsD0UX9sv/24ZXesNgoE0pQJCx+SR70k3pxQOlcIweBzoEHe68/ZehCFY6YdcBZqyzIGdRF+LMWMPqEMCpFrbKefi6fZ8fKd0m8BuVP0rNNd4Fz4eVS0wQA8emHL1XiwfWAd5HTS32vwtzwkELZLJOBih7ShbEmaIB3mvIGdnmL3PRNdJM9IM54KJDp0QLsWmO8eHlvS675jn4cozBuFmX1x9I4fBwq5dWBSnkhiatUMWHFwsyKnYZsg9ACSJ5paGQrPzhmHKRrOUMjbQwkF+p8/T3HNiv7R42Ov+ltu/0vhp+o4xwOC3fN66zRBDMkw7i2zYfqgy+RN88GBhqFfN/l0zBgCdDDl0VW3V385k1nCLJ8zZ051+d3Q0EcS+KTctL6x9mW7Oh3nGjwrOoFktc+B/S1v9nxMmS4ur3S1dA+lylprJ5Bg4JehsAFOhA2nETCK4o3xUFv9vJUyJ87dvMNZ1Oo6PRangr1Dpbt0DKqGsYEqAXzW6QlgyDSO9TCYWbfq4hwpgLjTYiCEbRksMO5jguVF6rjGAPsoCc/r3mwMgkA3v5aYK693ly1UzQAdX9pIYMFVMWA+BsxmVWPmtbXQO1gY1hwthhwmyMPV6ArBE8YtJ/roRL1ayIt3KAYP7/PUbxmN5RaRLud0jCHdEupn4+ThDYmUQRRrp/EQ== 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:(4636009)(366004)(186003)(6506007)(4326008)(66476007)(66946007)(66556008)(66446008)(64756008)(71200400001)(2906002)(9686003)(55016003)(33656002)(76116006)(30864003)(91956017)(5660300002)(52536014)(54906003)(38100700002)(316002)(122000001)(110136005)(83380400001)(8676002)(8936002)(82960400001)(508600001)(7696005)(38070700005)(86362001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?eucgb2312_cn?b?TnZleHlscDhKYzlWYytLNEg0?= =?eucgb2312_cn?b?WmcxWWpna2tlbD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JIOUVUN3lpNGU3WDhTR0dQSzI3QzVQUkFxdnIyMHdV?= =?eucgb2312_cn?b?SFRwSFVJaTZhLzhOc3NGWldwMXh0ZHEzL3k4ZTZvWW5FTmFaZndSTnd4ejArYXZq?= =?eucgb2312_cn?b?REQ1YUlBSGpDUVprbmZ6V1RlK1d0Z05TcFVVVVJZKzhRL2l5MzRBOEhJSWduZEVm?= =?eucgb2312_cn?b?Y01HM0dDUG9mVFFjYjZXUlUzUkN6cDU0MC9XSkg4UG9SUUEvSVlIT20wZDhpTExa?= =?eucgb2312_cn?b?SVRRdFk4dTJVWFZVS0t5bXRmalh6K2FDbnh1VzZ2ejFZMDNycGxxWUo1L0tHL0Vl?= =?eucgb2312_cn?b?UGpDSndXMnIvN29GWkpnSXlCV3NQemxMUVkxUjMyWHVybzdlTHhFUzc3MEVlS3RW?= =?eucgb2312_cn?b?c3laSDZoM3d4Z0NWeUxoTlIxM2J3RnNHellySUVMZUh2Zy82QTBCVVNaQmRjbmZn?= =?eucgb2312_cn?b?eUFOSkZBS3B0L3ZoREczV1BvWVZFaDN2TzNxZCtTd2taZ0NqUjZkNGs9?= 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: 1a8c6f70-9562-44fc-1a61-08d9bf8983bf X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Dec 2021 05:12:38.4534 (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: /fB20gL1ZFrmbm/fmyiG8Ty8TJsioJCfZF3mbMXTLKkJx8sglMfb4ZrFwF9YwGXDmW1RAPDQvz37Cy7aaglyGg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR04MB3585 X-Proofpoint-GUID: Y1roIRDmfROespjXOECxlQVHsKC7_PCr X-Proofpoint-ORIG-GUID: Y1roIRDmfROespjXOECxlQVHsKC7_PCr X-Sony-Outbound-GUID: Y1roIRDmfROespjXOECxlQVHsKC7_PCr X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2021-12-15_01,2021-12-14_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 lowpriorityscore=0 spamscore=0 mlxscore=0 phishscore=0 adultscore=0 priorityscore=1501 impostorscore=0 bulkscore=0 mlxlogscore=999 clxscore=1011 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112150029 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org No any function uses argument 'sector', remove it. Signed-off-by: Yuezhang.Mo Reviewed-by: Andy.Wu Reviewed-by: Aoyama, Wataru Acked-by: Sungjong Seo --- fs/exfat/balloc.c | 2 +- fs/exfat/dir.c | 36 ++++++++++++++---------------------- fs/exfat/exfat_fs.h | 3 +-- fs/exfat/namei.c | 42 ++++++++++++++++-------------------------- fs/exfat/nls.c | 2 +- 5 files changed, 33 insertions(+), 52 deletions(-) diff --git a/fs/exfat/balloc.c b/fs/exfat/balloc.c index cc5cffc4a769..03f142307174 100644 --- a/fs/exfat/balloc.c +++ b/fs/exfat/balloc.c @@ -105,7 +105,7 @@ int exfat_load_bitmap(struct super_block *sb) struct exfat_dentry *ep; struct buffer_head *bh; - ep = exfat_get_dentry(sb, &clu, i, &bh, NULL); + ep = exfat_get_dentry(sb, &clu, i, &bh); if (!ep) return -EIO; diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c index cb1c0d8c1714..14c819f3599f 100644 --- a/fs/exfat/dir.c +++ b/fs/exfat/dir.c @@ -64,7 +64,6 @@ static int exfat_readdir(struct inode *inode, loff_t *cpos, struct exfat_dir_ent { int i, dentries_per_clu, dentries_per_clu_bits = 0, num_ext; unsigned int type, clu_offset, max_dentries; - sector_t sector; struct exfat_chain dir, clu; struct exfat_uni_name uni_name; struct exfat_dentry *ep; @@ -115,7 +114,7 @@ static int exfat_readdir(struct inode *inode, loff_t *cpos, struct exfat_dir_ent i = dentry & (dentries_per_clu - 1); for ( ; i < dentries_per_clu; i++, dentry++) { - ep = exfat_get_dentry(sb, &clu, i, &bh, §or); + ep = exfat_get_dentry(sb, &clu, i, &bh); if (!ep) return -EIO; @@ -156,7 +155,7 @@ static int exfat_readdir(struct inode *inode, loff_t *cpos, struct exfat_dir_ent dir_entry->namebuf.lfnbuf_len); brelse(bh); - ep = exfat_get_dentry(sb, &clu, i + 1, &bh, NULL); + ep = exfat_get_dentry(sb, &clu, i + 1, &bh); if (!ep) return -EIO; dir_entry->size = @@ -445,7 +444,6 @@ int exfat_init_dir_entry(struct inode *inode, struct exfat_chain *p_dir, struct super_block *sb = inode->i_sb; struct exfat_sb_info *sbi = EXFAT_SB(sb); struct timespec64 ts = current_time(inode); - sector_t sector; struct exfat_dentry *ep; struct buffer_head *bh; @@ -453,7 +451,7 @@ int exfat_init_dir_entry(struct inode *inode, struct exfat_chain *p_dir, * We cannot use exfat_get_dentry_set here because file ep is not * initialized yet. */ - ep = exfat_get_dentry(sb, p_dir, entry, &bh, §or); + ep = exfat_get_dentry(sb, p_dir, entry, &bh); if (!ep) return -EIO; @@ -477,7 +475,7 @@ int exfat_init_dir_entry(struct inode *inode, struct exfat_chain *p_dir, exfat_update_bh(bh, IS_DIRSYNC(inode)); brelse(bh); - ep = exfat_get_dentry(sb, p_dir, entry + 1, &bh, §or); + ep = exfat_get_dentry(sb, p_dir, entry + 1, &bh); if (!ep) return -EIO; @@ -496,12 +494,11 @@ int exfat_update_dir_chksum(struct inode *inode, struct exfat_chain *p_dir, struct super_block *sb = inode->i_sb; int ret = 0; int i, num_entries; - sector_t sector; u16 chksum; struct exfat_dentry *ep, *fep; struct buffer_head *fbh, *bh; - fep = exfat_get_dentry(sb, p_dir, entry, &fbh, §or); + fep = exfat_get_dentry(sb, p_dir, entry, &fbh); if (!fep) return -EIO; @@ -509,7 +506,7 @@ int exfat_update_dir_chksum(struct inode *inode, struct exfat_chain *p_dir, chksum = exfat_calc_chksum16(fep, DENTRY_SIZE, 0, CS_DIR_ENTRY); for (i = 1; i < num_entries; i++) { - ep = exfat_get_dentry(sb, p_dir, entry + i, &bh, NULL); + ep = exfat_get_dentry(sb, p_dir, entry + i, &bh); if (!ep) { ret = -EIO; goto release_fbh; @@ -531,13 +528,12 @@ int exfat_init_ext_entry(struct inode *inode, struct exfat_chain *p_dir, { struct super_block *sb = inode->i_sb; int i; - sector_t sector; unsigned short *uniname = p_uniname->name; struct exfat_dentry *ep; struct buffer_head *bh; int sync = IS_DIRSYNC(inode); - ep = exfat_get_dentry(sb, p_dir, entry, &bh, §or); + ep = exfat_get_dentry(sb, p_dir, entry, &bh); if (!ep) return -EIO; @@ -545,7 +541,7 @@ int exfat_init_ext_entry(struct inode *inode, struct exfat_chain *p_dir, exfat_update_bh(bh, sync); brelse(bh); - ep = exfat_get_dentry(sb, p_dir, entry + 1, &bh, §or); + ep = exfat_get_dentry(sb, p_dir, entry + 1, &bh); if (!ep) return -EIO; @@ -555,7 +551,7 @@ int exfat_init_ext_entry(struct inode *inode, struct exfat_chain *p_dir, brelse(bh); for (i = EXFAT_FIRST_CLUSTER; i < num_entries; i++) { - ep = exfat_get_dentry(sb, p_dir, entry + i, &bh, §or); + ep = exfat_get_dentry(sb, p_dir, entry + i, &bh); if (!ep) return -EIO; @@ -574,12 +570,11 @@ int exfat_remove_entries(struct inode *inode, struct exfat_chain *p_dir, { struct super_block *sb = inode->i_sb; int i; - sector_t sector; struct exfat_dentry *ep; struct buffer_head *bh; for (i = order; i < num_entries; i++) { - ep = exfat_get_dentry(sb, p_dir, entry + i, &bh, §or); + ep = exfat_get_dentry(sb, p_dir, entry + i, &bh); if (!ep) return -EIO; @@ -717,8 +712,7 @@ static int exfat_dir_readahead(struct super_block *sb, sector_t sec) } struct exfat_dentry *exfat_get_dentry(struct super_block *sb, - struct exfat_chain *p_dir, int entry, struct buffer_head **bh, - sector_t *sector) + struct exfat_chain *p_dir, int entry, struct buffer_head **bh) { unsigned int dentries_per_page = EXFAT_B_TO_DEN(PAGE_SIZE); int off; @@ -740,8 +734,6 @@ struct exfat_dentry *exfat_get_dentry(struct super_block *sb, if (!*bh) return NULL; - if (sector) - *sector = sec; return (struct exfat_dentry *)((*bh)->b_data + off); } @@ -960,7 +952,7 @@ int exfat_find_dir_entry(struct super_block *sb, struct exfat_inode_info *ei, if (rewind && dentry == end_eidx) goto not_found; - ep = exfat_get_dentry(sb, &clu, i, &bh, NULL); + ep = exfat_get_dentry(sb, &clu, i, &bh); if (!ep) return -EIO; @@ -1145,7 +1137,7 @@ int exfat_count_ext_entries(struct super_block *sb, struct exfat_chain *p_dir, struct buffer_head *bh; for (i = 0, entry++; i < ep->dentry.file.num_ext; i++, entry++) { - ext_ep = exfat_get_dentry(sb, p_dir, entry, &bh, NULL); + ext_ep = exfat_get_dentry(sb, p_dir, entry, &bh); if (!ext_ep) return -EIO; @@ -1175,7 +1167,7 @@ int exfat_count_dir_entries(struct super_block *sb, struct exfat_chain *p_dir) while (clu.dir != EXFAT_EOF_CLUSTER) { for (i = 0; i < dentries_per_clu; i++) { - ep = exfat_get_dentry(sb, &clu, i, &bh, NULL); + ep = exfat_get_dentry(sb, &clu, i, &bh); if (!ep) return -EIO; entry_type = exfat_get_entry_type(ep); diff --git a/fs/exfat/exfat_fs.h b/fs/exfat/exfat_fs.h index 1d6da61157c9..37697b50edbe 100644 --- a/fs/exfat/exfat_fs.h +++ b/fs/exfat/exfat_fs.h @@ -462,8 +462,7 @@ int exfat_alloc_new_dir(struct inode *inode, struct exfat_chain *clu); int exfat_find_location(struct super_block *sb, struct exfat_chain *p_dir, int entry, sector_t *sector, int *offset); struct exfat_dentry *exfat_get_dentry(struct super_block *sb, - struct exfat_chain *p_dir, int entry, struct buffer_head **bh, - sector_t *sector); + struct exfat_chain *p_dir, int entry, struct buffer_head **bh); struct exfat_dentry *exfat_get_dentry_cached(struct exfat_entry_set_cache *es, int num); struct exfat_entry_set_cache *exfat_get_dentry_set(struct super_block *sb, diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c index 24b41103d1cc..4a9ea59e8915 100644 --- a/fs/exfat/namei.c +++ b/fs/exfat/namei.c @@ -229,7 +229,7 @@ static int exfat_search_empty_slot(struct super_block *sb, i = dentry & (dentries_per_clu - 1); for (; i < dentries_per_clu; i++, dentry++) { - ep = exfat_get_dentry(sb, &clu, i, &bh, NULL); + ep = exfat_get_dentry(sb, &clu, i, &bh); if (!ep) return -EIO; type = exfat_get_entry_type(ep); @@ -306,7 +306,6 @@ static int exfat_find_empty_entry(struct inode *inode, { int dentry; unsigned int ret, last_clu; - sector_t sector; loff_t size = 0; struct exfat_chain clu; struct exfat_dentry *ep = NULL; @@ -379,7 +378,7 @@ static int exfat_find_empty_entry(struct inode *inode, struct buffer_head *bh; ep = exfat_get_dentry(sb, - &(ei->dir), ei->entry + 1, &bh, §or); + &(ei->dir), ei->entry + 1, &bh); if (!ep) return -EIO; @@ -779,7 +778,6 @@ static int exfat_unlink(struct inode *dir, struct dentry *dentry) struct inode *inode = dentry->d_inode; struct exfat_inode_info *ei = EXFAT_I(inode); struct buffer_head *bh; - sector_t sector; int num_entries, entry, err = 0; mutex_lock(&EXFAT_SB(sb)->s_lock); @@ -791,7 +789,7 @@ static int exfat_unlink(struct inode *dir, struct dentry *dentry) goto unlock; } - ep = exfat_get_dentry(sb, &cdir, entry, &bh, §or); + ep = exfat_get_dentry(sb, &cdir, entry, &bh); if (!ep) { err = -EIO; goto unlock; @@ -895,7 +893,7 @@ static int exfat_check_dir_empty(struct super_block *sb, while (clu.dir != EXFAT_EOF_CLUSTER) { for (i = 0; i < dentries_per_clu; i++) { - ep = exfat_get_dentry(sb, &clu, i, &bh, NULL); + ep = exfat_get_dentry(sb, &clu, i, &bh); if (!ep) return -EIO; type = exfat_get_entry_type(ep); @@ -932,7 +930,6 @@ static int exfat_rmdir(struct inode *dir, struct dentry *dentry) struct exfat_sb_info *sbi = EXFAT_SB(sb); struct exfat_inode_info *ei = EXFAT_I(inode); struct buffer_head *bh; - sector_t sector; int num_entries, entry, err; mutex_lock(&EXFAT_SB(inode->i_sb)->s_lock); @@ -957,7 +954,7 @@ static int exfat_rmdir(struct inode *dir, struct dentry *dentry) goto unlock; } - ep = exfat_get_dentry(sb, &cdir, entry, &bh, §or); + ep = exfat_get_dentry(sb, &cdir, entry, &bh); if (!ep) { err = -EIO; goto unlock; @@ -1005,13 +1002,12 @@ static int exfat_rename_file(struct inode *inode, struct exfat_chain *p_dir, struct exfat_inode_info *ei) { int ret, num_old_entries, num_new_entries; - sector_t sector_old, sector_new; struct exfat_dentry *epold, *epnew; struct super_block *sb = inode->i_sb; struct buffer_head *new_bh, *old_bh; int sync = IS_DIRSYNC(inode); - epold = exfat_get_dentry(sb, p_dir, oldentry, &old_bh, §or_old); + epold = exfat_get_dentry(sb, p_dir, oldentry, &old_bh); if (!epold) return -EIO; @@ -1032,8 +1028,7 @@ static int exfat_rename_file(struct inode *inode, struct exfat_chain *p_dir, if (newentry < 0) return newentry; /* -EIO or -ENOSPC */ - epnew = exfat_get_dentry(sb, p_dir, newentry, &new_bh, - §or_new); + epnew = exfat_get_dentry(sb, p_dir, newentry, &new_bh); if (!epnew) return -EIO; @@ -1046,12 +1041,10 @@ static int exfat_rename_file(struct inode *inode, struct exfat_chain *p_dir, brelse(old_bh); brelse(new_bh); - epold = exfat_get_dentry(sb, p_dir, oldentry + 1, &old_bh, - §or_old); + epold = exfat_get_dentry(sb, p_dir, oldentry + 1, &old_bh); if (!epold) return -EIO; - epnew = exfat_get_dentry(sb, p_dir, newentry + 1, &new_bh, - §or_new); + epnew = exfat_get_dentry(sb, p_dir, newentry + 1, &new_bh); if (!epnew) { brelse(old_bh); return -EIO; @@ -1093,12 +1086,11 @@ static int exfat_move_file(struct inode *inode, struct exfat_chain *p_olddir, struct exfat_uni_name *p_uniname, struct exfat_inode_info *ei) { int ret, newentry, num_new_entries, num_old_entries; - sector_t sector_mov, sector_new; struct exfat_dentry *epmov, *epnew; struct super_block *sb = inode->i_sb; struct buffer_head *mov_bh, *new_bh; - epmov = exfat_get_dentry(sb, p_olddir, oldentry, &mov_bh, §or_mov); + epmov = exfat_get_dentry(sb, p_olddir, oldentry, &mov_bh); if (!epmov) return -EIO; @@ -1116,7 +1108,7 @@ static int exfat_move_file(struct inode *inode, struct exfat_chain *p_olddir, if (newentry < 0) return newentry; /* -EIO or -ENOSPC */ - epnew = exfat_get_dentry(sb, p_newdir, newentry, &new_bh, §or_new); + epnew = exfat_get_dentry(sb, p_newdir, newentry, &new_bh); if (!epnew) return -EIO; @@ -1129,12 +1121,10 @@ static int exfat_move_file(struct inode *inode, struct exfat_chain *p_olddir, brelse(mov_bh); brelse(new_bh); - epmov = exfat_get_dentry(sb, p_olddir, oldentry + 1, &mov_bh, - §or_mov); + epmov = exfat_get_dentry(sb, p_olddir, oldentry + 1, &mov_bh); if (!epmov) return -EIO; - epnew = exfat_get_dentry(sb, p_newdir, newentry + 1, &new_bh, - §or_new); + epnew = exfat_get_dentry(sb, p_newdir, newentry + 1, &new_bh); if (!epnew) { brelse(mov_bh); return -EIO; @@ -1216,7 +1206,7 @@ static int __exfat_rename(struct inode *old_parent_inode, exfat_chain_dup(&olddir, &ei->dir); dentry = ei->entry; - ep = exfat_get_dentry(sb, &olddir, dentry, &old_bh, NULL); + ep = exfat_get_dentry(sb, &olddir, dentry, &old_bh); if (!ep) { ret = -EIO; goto out; @@ -1237,7 +1227,7 @@ static int __exfat_rename(struct inode *old_parent_inode, p_dir = &(new_ei->dir); new_entry = new_ei->entry; - ep = exfat_get_dentry(sb, p_dir, new_entry, &new_bh, NULL); + ep = exfat_get_dentry(sb, p_dir, new_entry, &new_bh); if (!ep) goto out; @@ -1277,7 +1267,7 @@ static int __exfat_rename(struct inode *old_parent_inode, if (!ret && new_inode) { /* delete entries of new_dir */ - ep = exfat_get_dentry(sb, p_dir, new_entry, &new_bh, NULL); + ep = exfat_get_dentry(sb, p_dir, new_entry, &new_bh); if (!ep) { ret = -EIO; goto del_out; diff --git a/fs/exfat/nls.c b/fs/exfat/nls.c index 314d5407a1be..ef115e673406 100644 --- a/fs/exfat/nls.c +++ b/fs/exfat/nls.c @@ -761,7 +761,7 @@ int exfat_create_upcase_table(struct super_block *sb) while (clu.dir != EXFAT_EOF_CLUSTER) { for (i = 0; i < sbi->dentries_per_clu; i++) { - ep = exfat_get_dentry(sb, &clu, i, &bh, NULL); + ep = exfat_get_dentry(sb, &clu, i, &bh); if (!ep) return -EIO;