diff options
author | Deepa Dinamani <deepa.kernel@gmail.com> | 2019-06-23 19:17:10 -0400 |
---|---|---|
committer | Deepa Dinamani <deepa.kernel@gmail.com> | 2019-08-30 11:11:25 -0400 |
commit | 5ad32b3acded06183f40806f76b030c3143017bb (patch) | |
tree | 7f17946e0cd3675828ae73c84feb4adad522f65d | |
parent | 83b8a3fbe3aa82ac3c253b698ae6a9be2dbdd5e0 (diff) |
isofs: 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.
Reference: http://www.ecma-international.org/publications/standards/Ecma-119.htm
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Acked-by: Jeff Layton <jlayton@kernel.org>
-rw-r--r-- | fs/isofs/inode.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index 9e30d8703735..62c0462dc89f 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c | |||
@@ -30,6 +30,9 @@ | |||
30 | #include "isofs.h" | 30 | #include "isofs.h" |
31 | #include "zisofs.h" | 31 | #include "zisofs.h" |
32 | 32 | ||
33 | /* max tz offset is 13 hours */ | ||
34 | #define MAX_TZ_OFFSET (52*15*60) | ||
35 | |||
33 | #define BEQUIET | 36 | #define BEQUIET |
34 | 37 | ||
35 | static int isofs_hashi(const struct dentry *parent, struct qstr *qstr); | 38 | static int isofs_hashi(const struct dentry *parent, struct qstr *qstr); |
@@ -801,6 +804,10 @@ root_found: | |||
801 | */ | 804 | */ |
802 | s->s_maxbytes = 0x80000000000LL; | 805 | s->s_maxbytes = 0x80000000000LL; |
803 | 806 | ||
807 | /* ECMA-119 timestamp from 1900/1/1 with tz offset */ | ||
808 | s->s_time_min = mktime64(1900, 1, 1, 0, 0, 0) - MAX_TZ_OFFSET; | ||
809 | s->s_time_max = mktime64(U8_MAX+1900, 12, 31, 23, 59, 59) + MAX_TZ_OFFSET; | ||
810 | |||
804 | /* Set this for reference. Its not currently used except on write | 811 | /* Set this for reference. Its not currently used except on write |
805 | which we don't have .. */ | 812 | which we don't have .. */ |
806 | 813 | ||