diff options
author | Eric Sandeen <sandeen@sandeen.net> | 2020-04-21 11:13:10 +0900 |
---|---|---|
committer | Namjae Jeon <namjae.jeon@samsung.com> | 2020-04-22 20:14:06 +0900 |
commit | 81df1ad40644b706a1cdbd28a1471f9f0c0ea3e8 (patch) | |
tree | f91eeffa36abcb5b6c9c67ce33b8e24e07f576d7 /fs/exfat/super.c | |
parent | 674a9985b8e35288225f2b67829a7dee3bf761da (diff) | |
download | lwn-81df1ad40644b706a1cdbd28a1471f9f0c0ea3e8.tar.gz lwn-81df1ad40644b706a1cdbd28a1471f9f0c0ea3e8.zip |
exfat: truncate atimes to 2s granularity
The timestamp for access_time has double seconds granularity(There is no
10msIncrement field for access_time unlike create/modify_time).
exfat's atimes are restricted to only 2s granularity so after
we set an atime, round it down to the nearest 2s and set the
sub-second component of the timestamp to 0.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Diffstat (limited to 'fs/exfat/super.c')
-rw-r--r-- | fs/exfat/super.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/exfat/super.c b/fs/exfat/super.c index ee42ecf59059..0565d5539d57 100644 --- a/fs/exfat/super.c +++ b/fs/exfat/super.c @@ -342,6 +342,7 @@ static int exfat_read_root(struct inode *inode) exfat_save_attr(inode, ATTR_SUBDIR); inode->i_mtime = inode->i_atime = inode->i_ctime = ei->i_crtime = current_time(inode); + exfat_truncate_atime(&inode->i_atime); exfat_cache_init_inode(inode); return 0; } |