From be17b1ccd4e82a66b9d9676dec8edce137e967d8 Mon Sep 17 00:00:00 2001 From: Yuezhang Mo Date: Wed, 29 Jun 2022 11:05:51 +0800 Subject: exfat: remove duplicate write inode for extending dir/file Since the timestamps need to be updated, the directory entries will be updated by mark_inode_dirty() whether or not a new cluster is allocated for the file or directory, so there is no need to use __exfat_write_inode() to update the directory entries when allocating a new cluster for a file or directory. Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Daniel Palmer Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon --- fs/exfat/namei.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'fs/exfat/namei.c') diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c index d640f9de16a9..7fac9c4b60cf 100644 --- a/fs/exfat/namei.c +++ b/fs/exfat/namei.c @@ -388,10 +388,6 @@ static int exfat_find_empty_entry(struct inode *inode, ei->i_size_aligned += sbi->cluster_size; ei->flags = p_dir->flags; inode->i_blocks += 1 << sbi->sect_per_clus_bits; - - /* update the directory entry */ - if (__exfat_write_inode(inode, IS_DIRSYNC(inode))) - return -EIO; } return dentry; -- cgit v1.2.3