diff options
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 27cd622676e7..3db5f17228b7 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -4039,8 +4039,21 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) | |||
4039 | sbi->s_inode_size); | 4039 | sbi->s_inode_size); |
4040 | goto failed_mount; | 4040 | goto failed_mount; |
4041 | } | 4041 | } |
4042 | if (sbi->s_inode_size > EXT4_GOOD_OLD_INODE_SIZE) | 4042 | /* |
4043 | sb->s_time_gran = 1 << (EXT4_EPOCH_BITS - 2); | 4043 | * i_atime_extra is the last extra field available for [acm]times in |
4044 | * struct ext4_inode. Checking for that field should suffice to ensure | ||
4045 | * we have extra space for all three. | ||
4046 | */ | ||
4047 | if (sbi->s_inode_size >= offsetof(struct ext4_inode, i_atime_extra) + | ||
4048 | sizeof(((struct ext4_inode *)0)->i_atime_extra)) { | ||
4049 | sb->s_time_gran = 1; | ||
4050 | sb->s_time_max = EXT4_EXTRA_TIMESTAMP_MAX; | ||
4051 | } else { | ||
4052 | sb->s_time_gran = NSEC_PER_SEC; | ||
4053 | sb->s_time_max = EXT4_NON_EXTRA_TIMESTAMP_MAX; | ||
4054 | } | ||
4055 | |||
4056 | sb->s_time_min = EXT4_TIMESTAMP_MIN; | ||
4044 | } | 4057 | } |
4045 | 4058 | ||
4046 | sbi->s_desc_size = le16_to_cpu(es->s_desc_size); | 4059 | sbi->s_desc_size = le16_to_cpu(es->s_desc_size); |