exfat: fix setting uninitialized time to ctime/atime
authorYuezhang Mo <Yuezhang.Mo@sony.com>
Tue, 31 Oct 2023 09:52:13 +0000 (17:52 +0800)
committerNamjae Jeon <linkinjeon@kernel.org>
Fri, 3 Nov 2023 13:24:07 +0000 (22:24 +0900)
commitfc12a722e6b799d1d3c1520dc9ba9aab4fda04bf
treebf1f616dd9740d62ddb2f6f5a3b6e35089910aab
parent8f6f76a6a29f36d2f3e4510d0bde5046672f6924
exfat: fix setting uninitialized time to ctime/atime

An uninitialized time is set to ctime/atime in __exfat_write_inode().
It causes xfstests generic/003 and generic/192 to fail.

And since there will be a time gap between setting ctime/atime to
the inode and writing back the inode, so ctime/atime should not be
set again when writing back the inode.

Fixes: 4c72a36edd54 ("exfat: convert to new timestamp accessors")
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>
fs/exfat/inode.c