OSDN Git Service

ext4: support fast symlinks from ext3 file systems
authorAndi Kleen <ak@linux.intel.com>
Mon, 4 Dec 2017 01:38:01 +0000 (20:38 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:10:22 +0000 (10:10 +0100)
commitae0bba6b38110e8b57b92aa820df8f78d3965fe6
treeae9be9dc8a0818acaa0bb128552a2219b4c733e7
parent2dea756b487547788c1f28439fbc3df270e6bf30
ext4: support fast symlinks from ext3 file systems

commit fc82228a5e3860502dbf3bfa4a9570cb7093cf7f upstream.

407cd7fb83c0 (ext4: change fast symlink test to not rely on i_blocks)
broke ~10 years old ext3 file systems created by 2.6.17. Any ELF
executable fails because the /lib/ld-linux.so.2 fast symlink
cannot be read anymore.

The patch assumed fast symlinks were created in a specific way,
but that's not true on these really old file systems.

The new behavior is apparently needed only with the large EA inode
feature.

Revert to the old behavior if the large EA inode feature is not set.

This makes my old VM boot again.

Fixes: 407cd7fb83c0 (ext4: change fast symlink test to not rely on i_blocks)
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/inode.c