fs: omfs: Initialize filesystem timestamp ranges
authorDeepa Dinamani <deepa.kernel@gmail.com>
Sun, 23 Jun 2019 22:10:51 +0000 (15:10 -0700)
committerDeepa Dinamani <deepa.kernel@gmail.com>
Fri, 30 Aug 2019 15:11:25 +0000 (08:11 -0700)
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: Bob Copeland <me@bobcopeland.com>
Acked-by: Jeff Layton <jlayton@kernel.org>
Cc: me@bobcopeland.com
Cc: linux-karma-devel@lists.sourceforge.net
fs/omfs/inode.c

index 08226a835ec3334fc5f09dba90a74a5e1a953362..b76ec6b88ded5c8c0717817bd77ade59991f8fbd 100644 (file)
@@ -478,6 +478,10 @@ static int omfs_fill_super(struct super_block *sb, void *data, int silent)
 
        sb->s_maxbytes = 0xffffffff;
 
+       sb->s_time_gran = NSEC_PER_MSEC;
+       sb->s_time_min = 0;
+       sb->s_time_max = U64_MAX / MSEC_PER_SEC;
+
        sb_set_blocksize(sb, 0x200);
 
        bh = sb_bread(sb, 0);