diff options
author | Yuezhang Mo <Yuezhang.Mo@sony.com> | 2022-06-29 10:39:59 +0800 |
---|---|---|
committer | Namjae Jeon <linkinjeon@kernel.org> | 2022-08-01 10:14:06 +0900 |
commit | 4493895b2bdcca135a8e7c1384deaa35316e8e22 (patch) | |
tree | c6578d6870362eabe87dab50be12ec004401608d /fs/exfat/inode.c | |
parent | 23e6e1c9b373c164bf25d89c901eed2ac0d898a1 (diff) | |
download | linux-4493895b2bdcca135a8e7c1384deaa35316e8e22.tar.gz linux-4493895b2bdcca135a8e7c1384deaa35316e8e22.tar.bz2 linux-4493895b2bdcca135a8e7c1384deaa35316e8e22.zip |
exfat: remove duplicate write inode for truncating file
This commit moves updating file attributes and timestamps before
calling __exfat_write_inode(), so that all updates of the inode
had been written by __exfat_write_inode(), mark_inode_dirty() is
unneeded.
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: Daniel Palmer <daniel.palmer@sony.com>
Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'fs/exfat/inode.c')
-rw-r--r-- | fs/exfat/inode.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/exfat/inode.c b/fs/exfat/inode.c index ebc64fa5c2de..3acfbec1a0d4 100644 --- a/fs/exfat/inode.c +++ b/fs/exfat/inode.c @@ -369,6 +369,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); } } |