Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ext4: remove timebomb in ext4_decode_extra_time()

Changing behavior based on the version code is a timebomb waiting to
happen, and not easily bisectable. Drop it and leave any removal
to explicit developer action. (And I don't think file system
should _ever_ remove backwards compatibility that has no explicit
flag, but I'll leave that to the ext4 folks).

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Eric Biggers <ebiggers@google.com>

authored by

Christoph Hellwig and committed by
Theodore Ts'o
eaa093d2 d695a1be

+4 -6
+4 -6
fs/ext4/ext4.h
··· 838 838 { 839 839 if (unlikely(sizeof(time->tv_sec) > 4 && 840 840 (extra & cpu_to_le32(EXT4_EPOCH_MASK)))) { 841 - #if LINUX_VERSION_CODE < KERNEL_VERSION(4,20,0) 841 + 842 + #if 1 842 843 /* Handle legacy encoding of pre-1970 dates with epoch 843 - * bits 1,1. We assume that by kernel version 4.20, 844 - * everyone will have run fsck over the affected 845 - * filesystems to correct the problem. (This 846 - * backwards compatibility may be removed before this 847 - * time, at the discretion of the ext4 developers.) 844 + * bits 1,1. (This backwards compatibility may be removed 845 + * at the discretion of the ext4 developers.) 848 846 */ 849 847 u64 extra_bits = le32_to_cpu(extra) & EXT4_EPOCH_MASK; 850 848 if (extra_bits == 3 && ((time->tv_sec) & 0x80000000) != 0)