exfat: remove argument 'size' from exfat_truncate()

argument 'size' is not used in exfat_truncate(), remove it.

Code refinement, no functional changes.

Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Andy Wu <Andy.Wu@sony.com>
Reviewed-by: Aoyama Wataru <wataru.aoyama@sony.com>
Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
This commit is contained in:
Yuezhang Mo 2022-12-09 22:37:17 +09:00 committed by Namjae Jeon
parent 5098d1ebfc
commit bf6c668d6e
3 changed files with 4 additions and 4 deletions

View File

@ -472,7 +472,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);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0)
int exfat_setattr(struct user_namespace *mnt_userns, struct dentry *dentry,

4
file.c
View File

@ -196,7 +196,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);
@ -362,7 +362,7 @@ int exfat_setattr(struct dentry *dentry, struct iattr *attr)
* __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);

View File

@ -383,7 +383,7 @@ static void exfat_write_failed(struct address_space *mapping, loff_t to)
#else
inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
#endif
exfat_truncate(inode, EXFAT_I(inode)->i_size_aligned);
exfat_truncate(inode);
}
}