From: Greg Kroah-Hartman Date: Mon, 23 Nov 2020 09:12:57 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v4.4.246~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=db895db52d13e9910cb1ec1ad292705bf3d22a7d;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: ext4-fix-bogus-warning-in-ext4_update_dx_flag.patch --- diff --git a/queue-4.4/ext4-fix-bogus-warning-in-ext4_update_dx_flag.patch b/queue-4.4/ext4-fix-bogus-warning-in-ext4_update_dx_flag.patch new file mode 100644 index 00000000000..240d56d147d --- /dev/null +++ b/queue-4.4/ext4-fix-bogus-warning-in-ext4_update_dx_flag.patch @@ -0,0 +1,40 @@ +From f902b216501094495ff75834035656e8119c537f Mon Sep 17 00:00:00 2001 +From: Jan Kara +Date: Wed, 18 Nov 2020 16:30:32 +0100 +Subject: ext4: fix bogus warning in ext4_update_dx_flag() + +From: Jan Kara + +commit f902b216501094495ff75834035656e8119c537f upstream. + +The idea of the warning in ext4_update_dx_flag() is that we should warn +when we are clearing EXT4_INODE_INDEX on a filesystem with metadata +checksums enabled since after clearing the flag, checksums for internal +htree nodes will become invalid. So there's no need to warn (or actually +do anything) when EXT4_INODE_INDEX is not set. + +Link: https://lore.kernel.org/r/20201118153032.17281-1-jack@suse.cz +Fixes: 48a34311953d ("ext4: fix checksum errors with indexed dirs") +Reported-by: Eric Biggers +Reviewed-by: Eric Biggers +Signed-off-by: Jan Kara +Signed-off-by: Theodore Ts'o +Cc: stable@kernel.org +Signed-off-by: Greg Kroah-Hartman + +--- + fs/ext4/ext4.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/fs/ext4/ext4.h ++++ b/fs/ext4/ext4.h +@@ -2398,7 +2398,8 @@ int ext4_insert_dentry(struct inode *dir + struct ext4_filename *fname); + static inline void ext4_update_dx_flag(struct inode *inode) + { +- if (!ext4_has_feature_dir_index(inode->i_sb)) { ++ if (!ext4_has_feature_dir_index(inode->i_sb) && ++ ext4_test_inode_flag(inode, EXT4_INODE_INDEX)) { + /* ext4_iget() should have caught this... */ + WARN_ON_ONCE(ext4_has_feature_metadata_csum(inode->i_sb)); + ext4_clear_inode_flag(inode, EXT4_INODE_INDEX); diff --git a/queue-4.4/series b/queue-4.4/series index e2684f0f7e4..cd77b93139a 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -28,3 +28,4 @@ alsa-ctl-fix-error-path-at-adding-user-defined-element-set.patch alsa-mixart-fix-mutex-deadlock.patch tty-serial-imx-keep-console-clocks-always-on.patch efivarfs-fix-memory-leak-in-efivarfs_create.patch +ext4-fix-bogus-warning-in-ext4_update_dx_flag.patch