Skip to content

Commit 452c277

Browse files
committed
fs: sysv: Initialize filesystem timestamp ranges
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 <deepa.kernel@gmail.com> Acked-by: Jeff Layton <jlayton@kernel.org> Cc: hch@infradead.org
1 parent 487b25b commit 452c277

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎fs/sysv/super.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,8 @@ static int sysv_fill_super(struct super_block *sb, void *data, int silent)
368368
sbi->s_block_base = 0;
369369
mutex_init(&sbi->s_lock);
370370
sb->s_fs_info = sbi;
371-
371+
sb->s_time_min = 0;
372+
sb->s_time_max = U32_MAX;
372373
sb_set_blocksize(sb, BLOCK_SIZE);
373374

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

491494
sb_set_blocksize(sb, 512);
492495

0 commit comments

Comments
 (0)