diff options
author | Deepa Dinamani <deepa.kernel@gmail.com> | 2019-03-22 00:05:12 +0300 |
---|---|---|
committer | Deepa Dinamani <deepa.kernel@gmail.com> | 2019-08-30 17:27:18 +0300 |
commit | 487b25bc4be9c15a5edb81c4e52160b5e84d1c4f (patch) | |
tree | d4a8e515b4dc209dc530e244ccd6814813d4790e /fs/affs/amigaffs.h | |
parent | c0da64f6bb674d20a8e84bcd30679c1483668fb2 (diff) | |
download | linux-487b25bc4be9c15a5edb81c4e52160b5e84d1c4f.tar.xz |
fs: affs: 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.
Also fix timestamp calculation to avoid overflow
while converting from days to seconds.
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Acked-by: David Sterba <dsterba@suse.com>
Acked-by: Jeff Layton <jlayton@kernel.org>
Cc: dsterba@suse.com
Diffstat (limited to 'fs/affs/amigaffs.h')
-rw-r--r-- | fs/affs/amigaffs.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/affs/amigaffs.h b/fs/affs/amigaffs.h index f9bef9056659..81fb396d4dfa 100644 --- a/fs/affs/amigaffs.h +++ b/fs/affs/amigaffs.h @@ -32,6 +32,9 @@ #define AFFS_ROOT_BMAPS 25 +/* Seconds since Amiga epoch of 1978/01/01 to UNIX */ +#define AFFS_EPOCH_DELTA ((8 * 365 + 2) * 86400LL) + struct affs_date { __be32 days; __be32 mins; |