From patchwork Tue Dec 13 02:37:02 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: 13071669 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 6FC8DC4332F for ; Tue, 13 Dec 2022 02:38:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234385AbiLMCia (ORCPT ); Mon, 12 Dec 2022 21:38:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234319AbiLMCiC (ORCPT ); Mon, 12 Dec 2022 21:38:02 -0500 Received: from mx08-001d1705.pphosted.com (mx08-001d1705.pphosted.com [185.183.30.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 456351E71F; Mon, 12 Dec 2022 18:37:16 -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 2BD1YF57012328; Tue, 13 Dec 2022 02:37:06 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=4Tn8j2rkPQ6pIp8ncNbqL6SPmdDap+l2SdSAFKIjnDI=; b=UhMChztCSCDTD+jgrw3clB1n77sefKTIwX6yKPL50LaaxORXfKxh5kFnO8ZLoVrrCsiy y29o+B4XFlAf+ZdnqjOwe5bdOJGcxbgsPnLUNQYZ+mGGgOSc9GYO2TyVtw+XsFbpRpYT PXX+tdbokewwN60PsQeL1xMsiFhD/6SBwTRlBjYsVQYzW/9Iawf0d65aIQaWM2S/W59j 7g85BHlLaT1vHbsfGGMcsGd//kK4nbr4TEgdwg1Z2jG76hiNYEAb0wc23uG0uicFj0Pj 06vEhSlJeLAtzUmQI/cM3DoZJNKNY3lNJLwMILiyKlTqwlXjArw7QWcdaTBH5FO+jnlH kw== 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-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 13 Dec 2022 02:37:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QELjKoHCcyYPiSeAp8HLX55FfqAQ5kw4UesUF6BHxM04siRoI6FnEZgwJzXtqbztP/3k8d8NGS8+DD+9Q3C415OTOmVZAbjWkQAq2ieqNDYK5szFbuptEIk9LKCTJIcCZoy9pFMg/VCgtZLaK88U6Qd0rSwCwfNvXaoTPaZykBwrXnhZ8/uncsNrsB3FwBRiSTqJnMv0rcZIx+8f2Lm7ehZ1/e9rgTCOwSMuL7IEvuEUpp1VhFiTvnhHFpUvpemlPs4qzjt2iPDlnrmpYmMbwicURbkDJ7NbI4kil0MiJcAmRoYU5XfD6y7PCELmEJD0HICp/cJQqMN3viRRr1MhPg== 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=4Tn8j2rkPQ6pIp8ncNbqL6SPmdDap+l2SdSAFKIjnDI=; b=V7gCtbuUJKXbedIfEK0cc1abKbp4v3iUkwAfPPGKMB6zWlWjglpCvYokawn9FIvb7nOjkclDnqLcJjFX1zcrEiklKb2a0+LeKADz7F3A7BUw8dxJy6AQJ5/Z+W2IgfWaLN3sKRdVBMPh0caejhByKhvIj1FoPDi0ZKK6UE6F/Kj6R/yGPrAvFEpr3F1BiUQTmWySkoPAXuj7SZPTA78m7TqK9w/PKml0G5kRss2vs81fJGQ2HsCmwn+bXAI/W9a/7vij1d+Ha2IeOyGUFDQnSFkec0MUzVAPGkd0aX5xk/YAtbTMLznQkMXhyKxuB9yclgi2Ba5HtH+GLjzgTVdxeA== 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:37:02 +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:37:02 +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 4/7] exfat: remove argument 'size' from exfat_truncate() Thread-Topic: [PATCH v2 4/7] exfat: remove argument 'size' from exfat_truncate() Thread-Index: AdkOmgiDw4qXtseLTQWWkAs2aAiRcA== Date: Tue, 13 Dec 2022 02:37:02 +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: 2408866f-47d5-4102-4eab-08dadcb2eac5 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 73CLvSnSfPJiI8v/bCE4trZjT91N5YeQfX3yXnuY/VNceUJnOQmsm+A37kEftU2VKo0ei0ciCjIWUBbP2A21NOIz+ejftzcuTOaOxwILEdek37dmZwgtyA+oonwxi2SLggzM2VsxVkzcbeRaGyuQ9koo0m0laWbTz+x2BLo8DEpANvaMWO46MMma/lDMoxRdA2/U2T7mLQBQE9oM1IXjNb4YagkHLTPI1MTBnKR52PdvP9O2ehOOyXILqVDw1kmiqBj5kA/9Og42RaHuYofUXrtsBA99GQ1B7pRjuyRvFiqOVJYMOs5UrHH1Z7m+TbWQWFxla/vKq5cqjg6QtdyJfoTnZAWGFGVvhQSOMmbv2Rmy9OXVKGl5qKOzi2wNwE0JqHz9KEN4xRu8OAp/40o/tlzxwO0Zq8jaAYrb+CygW3NM7I9mrc+4LYKUM8VvJsYWJIGDR8rgg1/+xIogE4c3sSVcedozMQ1WLA/Je+1zs+Y/4VAkNjWxnVouvzj48jkg+vHJhfoLXGlHF5BsArNH6iHLgc+lST/TA5P2H6iQd92eBt+XqpZarC9iwA73a2DMZBlvFy8hAJEkkqPoUbSgI8FStrYXyUXps9ZPdlAOnZaSAr3TdgJVjaYDThfmDG5gYh2pdjMQnnI4NMGKxrtYaxvyaT3PrSxlYs/BGIFI20rj5qEldUSHLlOzgUPgU5uooh/RVNionm8jTOK+5nqXEA== 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?srABKQjTzZS8ONsuMLqLBE4Bs3GH?= =?utf-8?q?uQ5xJ5FOuojv/PtB+s8gYNb+873Yc8IBA1IjN1cGKpR70VnZhq15GtJ5dUn/lmwmc?= =?utf-8?q?5Cm+8lkFGqcHqLAJy/+DNNWcgEkhMVNJNTHjjqm6MS8BDV14ry+vSvpuOqt/wc3HU?= =?utf-8?q?zK8ynWxUt4OSiwCmesiWhwn0+ztiwOntvieyaHRijbS1/XoJZ2GZcKLd1JoFkEDyg?= =?utf-8?q?Hy9rrZonjMBPBdpXATOBsUIC+ESrKSJcma7QEG8UKHu4i36irOlnqaoVOPJ4MRgPu?= =?utf-8?q?UxaqPZtU1JiSctgC0OImftxvogpc74K0px5mrVz1AQxuMc6DZiRFJMcuqxFszbOqg?= =?utf-8?q?higBiFojU+EU3h2i+TZ6wqkzt20XCCu+pt7xOiULy7UjOIlQMypiCcnrNQtkBJHzP?= =?utf-8?q?xYqPUczuMSl9X9n/KkfQKxC9s27nnUmPKO62aas52ZsAjtxCja0o6DcVn8oc0bWHa?= =?utf-8?q?z6zRhmjpvZERqtL+zSql992x/k1tAAFiKeBcYzrVNeqf5GXYW8vtWXq2im7kpJFv1?= =?utf-8?q?0zaMtwKtIMSSG/ur3bqOxRYBKA0CpiLzbxJhz/BYTz4ca+SCTpI4WLYJ+ep02+Rxo?= =?utf-8?q?LOHmnIk/W6HCOvD9ikQwViMQmcJBqrNOpzmPO7I6G1YJkdCYjFQhzp4r6OeshtjpN?= =?utf-8?q?gOBQ6KgWU7LaKaWBieSGBKskvoGnLh5XdEFFYiRmJxSCmbTpkkOQ5mAZn23iN3AlX?= =?utf-8?q?VqGvFboDNoLInpwZetczi/1Rlm77jpH2qT2G+Qh2Be8bkzaRfEo1234ZdjIVO5T/V?= =?utf-8?q?azQr9Hac/SSSPxUvYlRouljX7VLc3BL58DL1Xm2IE0IPNRNmqT8IXuJtj4o39hy0D?= =?utf-8?q?po3RmeUOKox5nArcvdvcd9HonEEoem8H8rZxvHOQGJANxsXR/TJAloQBlcfrknAaF?= =?utf-8?q?4NXl0iCq+lelvsMM12NTPdR9aRXng4C8h6SSN3bLQ1gTF6FtzcI9ERqa4QRwzZsrX?= =?utf-8?q?+Ac+GcZPKq9gHWXzdNMQdu51AnOiWbS2grOUaChyvpvkWjoADCgoxFRcJjTq8a3X+?= =?utf-8?q?JgbfhFQWgK6gARKxLSWUszBBK9e1aaPMrdTW7sGrqIC0elt6kTFF4bwETM79mXzH7?= =?utf-8?q?ZqQxFkQSfISesslPDFMLQ09TrrhjHoxDRaZzt80FN7dWQjiPE3UPi8VvBXhK/pGpp?= =?utf-8?q?/g+/Mucid1st4ydSvprwylnPacZ4CHAPvIoD/m1Y/64uDI8I12y4RprbtbS3CR+xJ?= =?utf-8?q?Lw/yB4GWDlFPgoQt9gDIu2OPyPfpB33cMNDo45Cea6LF9dYFsnYsAhTqLo51tlXeE?= =?utf-8?q?lYc5jiNKDQ9E46Q8jSUjSYZrDK3DS5h9nxkQZXag7rXsdM9lsvHCCQJJzNTDNFau8?= =?utf-8?q?gU+3ygUEJE4fA1WIrFX89htJrUaV+qyNmCq4h160IzDGYcNYjGunWgLS6wvMDszOX?= =?utf-8?q?kNJwwdiDfrBC4s2Jk/tgTH/uBwzoK2p/xrdQphinjbMEsM9LXgJnt00TCmntzyit7?= =?utf-8?q?LgqvWcPmW79vzGxxRTfAl2kvBoCAov+y5ikish5IyFFXVxZ0ARVv5ax0wSz0lwP3P?= =?utf-8?q?4VmQ4LXVsVZn?= 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: 2408866f-47d5-4102-4eab-08dadcb2eac5 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Dec 2022 02:37:02.7122 (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: gHRNTYpJdDH+9fkWmBUCTC8Rm9bQ8G2F/ZAY7BcBEIf9aMGMUgLCGZRWKpYitNjsS9NC9EWq+99fJ/j9IHdX2A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR04MB6948 X-Proofpoint-ORIG-GUID: m-RLNV8RFcG8iwxBttdTVFp9PRA1253z X-Proofpoint-GUID: m-RLNV8RFcG8iwxBttdTVFp9PRA1253z X-Sony-Outbound-GUID: m-RLNV8RFcG8iwxBttdTVFp9PRA1253z 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 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org argument 'size' is not used in exfat_truncate(), remove it. Code refinement, no functional changes. Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru --- fs/exfat/exfat_fs.h | 2 +- fs/exfat/file.c | 4 ++-- fs/exfat/inode.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/exfat/exfat_fs.h b/fs/exfat/exfat_fs.h index 21fec01d68ff..ae048802f9db 100644 --- a/fs/exfat/exfat_fs.h +++ b/fs/exfat/exfat_fs.h @@ -449,7 +449,7 @@ int exfat_trim_fs(struct inode *inode, struct fstrim_range *range); /* file.c */ extern const struct file_operations exfat_file_operations; int __exfat_truncate(struct inode *inode, loff_t new_size); -void exfat_truncate(struct inode *inode, loff_t size); +void exfat_truncate(struct inode *inode); int exfat_setattr(struct user_namespace *mnt_userns, struct dentry *dentry, struct iattr *attr); int exfat_getattr(struct user_namespace *mnt_userns, const struct path *path, diff --git a/fs/exfat/file.c b/fs/exfat/file.c index 4e0793f35e8f..7c97c1df1305 100644 --- a/fs/exfat/file.c +++ b/fs/exfat/file.c @@ -189,7 +189,7 @@ int __exfat_truncate(struct inode *inode, loff_t new_size) return 0; } -void exfat_truncate(struct inode *inode, loff_t size) +void exfat_truncate(struct inode *inode) { struct super_block *sb = inode->i_sb; struct exfat_sb_info *sbi = EXFAT_SB(sb); @@ -310,7 +310,7 @@ int exfat_setattr(struct user_namespace *mnt_userns, struct dentry *dentry, * __exfat_write_inode() is called from exfat_truncate(), inode * is already written by it, so mark_inode_dirty() is unneeded. */ - exfat_truncate(inode, attr->ia_size); + exfat_truncate(inode); up_write(&EXFAT_I(inode)->truncate_lock); } else mark_inode_dirty(inode); diff --git a/fs/exfat/inode.c b/fs/exfat/inode.c index dac5001bae9e..0d147f8a1f7c 100644 --- a/fs/exfat/inode.c +++ b/fs/exfat/inode.c @@ -362,7 +362,7 @@ static void exfat_write_failed(struct address_space *mapping, loff_t to) if (to > i_size_read(inode)) { truncate_pagecache(inode, i_size_read(inode)); inode->i_mtime = inode->i_ctime = current_time(inode); - exfat_truncate(inode, EXFAT_I(inode)->i_size_aligned); + exfat_truncate(inode); } }