Skip to contentSkip to conversation

Patch "ext4: fix lazytime optimization" has been added to the 4.0-stable tree

PATCH [email protected] 1 participant 1 message Jun 3, 2015

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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

ext4: fix lazytime optimization

to the 4.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-fix-lazytime-optimization.patch
and it can be found in the queue-4.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 8f4d855839179f410fa910a26eb81d646d628f26 Mon Sep 17 00:00:00 2001

From: Theodore Ts'o <[email protected]>
Date: Thu, 14 May 2015 18:19:01 -0400
Subject: ext4: fix lazytime optimization

From: Theodore Ts'o <[email protected]>

commit 8f4d855839179f410fa910a26eb81d646d628f26 upstream.

We had a fencepost error in the lazytime optimization which means that timestamp would get written to the wrong inode.

---
 fs/ext4/inode.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ext4/inode.c +1 -1
@@ -4233,7 +4233,7 @@ static void ext4_update_other_inodes_tim
 	int inode_size = EXT4_INODE_SIZE(sb);
 
 	oi.orig_ino = orig_ino;
-	ino = orig_ino & ~(inodes_per_block - 1);
+	ino = (orig_ino & ~(inodes_per_block - 1)) + 1;
 	for (i = 0; i < inodes_per_block; i++, ino++, buf += inode_size) {
 		if (ino == orig_ino)
 			continue;

Patches currently in stable-queue which might be from [email protected] are

queue-4.0/ext4-fix-lazytime-optimization.patch queue-4.0/ext4-check-for-zero-length-extent-explicitly.patch queue-4.0/ext4-fix-null-pointer-dereference-when-journal-restart-fails.patch queue-4.0/jbd2-fix-r_count-overflows-leading-to-buffer-overflow-in-journal-recovery.patch