]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
ext4: don't update s_rev_level if not required
authorAndreas Dilger <adilger@dilger.ca>
Thu, 14 Feb 2019 22:52:18 +0000 (17:52 -0500)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 30 Jul 2019 10:58:17 +0000 (12:58 +0200)
commited2756b031c406074527995e739700cc9e6c29cd
tree6554e59935a82fcd0c9472f4eb9bee56db44b55f
parenta4a653098806005813f2b43fc0946b3096ce14ab
ext4: don't update s_rev_level if not required

BugLink: https://bugs.launchpad.net/bugs/1836614
commit c9e716eb9b3455a83ed7c5f5a81256a3da779a95 upstream.

Don't update the superblock s_rev_level during mount if it isn't
actually necessary, only if superblock features are being set by
the kernel.  This was originally added for ext3 since it always
set the INCOMPAT_RECOVER and HAS_JOURNAL features during mount,
but this is not needed since no journal mode was added to ext4.

That will allow Geert to mount his 20-year-old ext2 rev 0.0 m68k
filesystem, as a testament of the backward compatibility of ext4.

Fixes: 0390131ba84f ("ext4: Allow ext4 to run without a journal")
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/ext4/ext4.h
fs/ext4/inode.c
fs/ext4/super.c