1 ext4: remove timebomb in ext4_decode_extra_time()
3 From: Christoph Hellwig <hch@lst.de>
5 Changing behavior based on the version code is a timebomb waiting to
6 happen, and not easily bisectable. Drop it and leave any removal
7 to explicit developer action. (And I don't think file system
8 should _ever_ remove backwards compatibility that has no explicit
9 flag, but I'll leave that to the ext4 folks).
11 Signed-off-by: Christoph Hellwig <hch@lst.de>
12 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
13 Reviewed-by: Eric Biggers <ebiggers@google.com>
15 fs/ext4/ext4.h | 10 ++++------
16 1 file changed, 4 insertions(+), 6 deletions(-)
18 diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
19 index a2bb7d2870e4..08d693255567 100644
22 @@ -838,13 +838,11 @@ static inline void ext4_decode_extra_time(struct timespec *time, __le32 extra)
24 if (unlikely(sizeof(time->tv_sec) > 4 &&
25 (extra & cpu_to_le32(EXT4_EPOCH_MASK)))) {
26 -#if LINUX_VERSION_CODE < KERNEL_VERSION(4,20,0)
29 /* Handle legacy encoding of pre-1970 dates with epoch
30 - * bits 1,1. We assume that by kernel version 4.20,
31 - * everyone will have run fsck over the affected
32 - * filesystems to correct the problem. (This
33 - * backwards compatibility may be removed before this
34 - * time, at the discretion of the ext4 developers.)
35 + * bits 1,1. (This backwards compatibility may be removed
36 + * at the discretion of the ext4 developers.)
38 u64 extra_bits = le32_to_cpu(extra) & EXT4_EPOCH_MASK;
39 if (extra_bits == 3 && ((time->tv_sec) & 0x80000000) != 0)