Patch "ext4: don't increase iversion counter for ea_inodes" has been added to the 6.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ext4: don't increase iversion counter for ea_inodes

to the 6.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ext4-don-t-increase-iversion-counter-for-ea_inodes.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 50f094a5580e6297bf10a807d16f0ee23fa576cf Mon Sep 17 00:00:00 2001
From: Lukas Czerner <lczerner@xxxxxxxxxx>
Date: Wed, 24 Aug 2022 18:03:47 +0200
Subject: ext4: don't increase iversion counter for ea_inodes

From: Lukas Czerner <lczerner@xxxxxxxxxx>

commit 50f094a5580e6297bf10a807d16f0ee23fa576cf upstream.

ea_inodes are using i_version for storing part of the reference count so
we really need to leave it alone.

The problem can be reproduced by xfstest ext4/026 when iversion is
enabled. Fix it by not calling inode_inc_iversion() for EXT4_EA_INODE_FL
inodes in ext4_mark_iloc_dirty().

Cc: stable@xxxxxxxxxx
Signed-off-by: Lukas Czerner <lczerner@xxxxxxxxxx>
Reviewed-by: Jan Kara <jack@xxxxxxx>
Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>
Reviewed-by: Christian Brauner (Microsoft) <brauner@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20220824160349.39664-1-lczerner@xxxxxxxxxx
Signed-off-by: Theodore Ts'o <tytso@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 fs/ext4/inode.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -5731,7 +5731,12 @@ int ext4_mark_iloc_dirty(handle_t *handl
 	}
 	ext4_fc_track_inode(handle, inode);
 
-	if (IS_I_VERSION(inode))
+	/*
+	 * ea_inodes are using i_version for storing reference count, don't
+	 * mess with it
+	 */
+	if (IS_I_VERSION(inode) &&
+	    !(EXT4_I(inode)->i_flags & EXT4_EA_INODE_FL))
 		inode_inc_iversion(inode);
 
 	/* the do_update_inode consumes one bh->b_count */


Patches currently in stable-queue which might be from lczerner@xxxxxxxxxx are

queue-6.0/ext4-unconditionally-enable-the-i_version-counter.patch
queue-6.0/ext4-fix-i_version-handling-in-ext4.patch
queue-6.0/fs-record-i_dirty_time-even-if-inode-already-has-i_dirty_inode.patch
queue-6.0/ext4-don-t-increase-iversion-counter-for-ea_inodes.patch
queue-6.0/ext4-avoid-crash-when-inline-data-creation-follows-dio-write.patch
queue-6.0/ext4-fix-check-for-block-being-out-of-directory-size.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux