Skip to content

Commit 674a998

Browse files
sandeennamjaejeon
authored andcommitted
exfat: properly set s_time_gran
The s_time_gran superblock field indicates the on-disk nanosecond granularity of timestamps, and for exfat that seems to be 10ms, so set s_time_gran to 10000000ns. Without this, in-memory timestamps change when they get re-read from disk. Signed-off-by: Eric Sandeen <[email protected]> Signed-off-by: Namjae Jeon <[email protected]>
1 parent cbd445d commit 674a998

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/exfat/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc)
529529
sb->s_magic = EXFAT_SUPER_MAGIC;
530530
sb->s_op = &exfat_sops;
531531

532-
sb->s_time_gran = 1;
532+
sb->s_time_gran = 10 * NSEC_PER_MSEC;
533533
sb->s_time_min = EXFAT_MIN_TIMESTAMP_SECS;
534534
sb->s_time_max = EXFAT_MAX_TIMESTAMP_SECS;
535535

0 commit comments

Comments
 (0)