summaryrefslogtreecommitdiffstats
path: root/fs/sysv
diff options
context:
space:
mode:
authorDeepa Dinamani <deepa.kernel@gmail.com>2019-03-08 12:40:03 -0800
committerDeepa Dinamani <deepa.kernel@gmail.com>2019-08-30 07:27:18 -0700
commit452c2779410a03ac0c6be0a8a91c83aa80bdd7e5 (patch)
tree34b576269e70620f1d158a2270e26728e2c82fac /fs/sysv
parent487b25bc4be9c15a5edb81c4e52160b5e84d1c4f (diff)
downloadlinux-452c2779410a03ac0c6be0a8a91c83aa80bdd7e5.tar.gz
linux-452c2779410a03ac0c6be0a8a91c83aa80bdd7e5.tar.bz2
linux-452c2779410a03ac0c6be0a8a91c83aa80bdd7e5.zip
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
Diffstat (limited to 'fs/sysv')
-rw-r--r--fs/sysv/super.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/sysv/super.c b/fs/sysv/super.c
index d788b1daa7eb..cc8e2ed155c8 100644
--- a/fs/sysv/super.c
+++ b/fs/sysv/super.c
@@ -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++) {
@@ -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);