Skip to content

Commit

Permalink
fs: sysv: Initialize filesystem timestamp ranges
Browse files Browse the repository at this point in the history
Fill in the appropriate limits to avoid inconsistencies
in the vfs cached inode times when timestamps are
outside the permitted range.

Signed-off-by: Deepa Dinamani <[email protected]>
Acked-by: Jeff Layton <[email protected]>
Cc: [email protected]
  • Loading branch information
deepa-hub committed Aug 30, 2019
1 parent 487b25b commit 452c277
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fs/sysv/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,8 @@ static int sysv_fill_super(struct super_block *sb, void *data, int silent)
sbi->s_block_base = 0;
mutex_init(&sbi->s_lock);
sb->s_fs_info = sbi;

sb->s_time_min = 0;
sb->s_time_max = U32_MAX;
sb_set_blocksize(sb, BLOCK_SIZE);

for (i = 0; i < ARRAY_SIZE(flavours) && !size; i++) {
Expand Down Expand Up @@ -487,6 +488,8 @@ static int v7_fill_super(struct super_block *sb, void *data, int silent)
sbi->s_type = FSTYPE_V7;
mutex_init(&sbi->s_lock);
sb->s_fs_info = sbi;
sb->s_time_min = 0;
sb->s_time_max = U32_MAX;

sb_set_blocksize(sb, 512);

Expand Down

0 comments on commit 452c277

Please sign in to comment.