From patchwork Thu Nov 15 06:19:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [3.5.yuz, extended, stable] Patch "ext4: remove erroneous ext4_superblock_csum_set() in" has been added to staging queue Date: Wed, 14 Nov 2012 20:19:33 -0000 From: Herton Ronaldo Krzesinski X-Patchwork-Id: 199190 Message-Id: <1352960373-18689-1-git-send-email-herton.krzesinski@canonical.com> To: Tao Ma Cc: kernel-team@lists.ubuntu.com, Theodore Ts'o This is a note to let you know that I have just added a patch titled ext4: remove erroneous ext4_superblock_csum_set() in to the linux-3.5.y-queue branch of the 3.5.yuz extended stable tree which can be found at: http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue If you, or anyone else, feels it should not be added to this tree, please reply to this email. For more information about the 3.5.yuz tree, see https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable Thanks. -Herton ------ >From 81ea94ce7789ba7145d52018980f2d22a8623dfb Mon Sep 17 00:00:00 2001 From: Tao Ma Date: Thu, 20 Sep 2012 11:35:38 -0400 Subject: [PATCH] ext4: remove erroneous ext4_superblock_csum_set() in update_backups() commit bef53b01faeb791e27605cba1a71ba21364cb23e upstream. The update_backups() function is used to backup all the metadata blocks, so we should not take it for granted that 'data' is pointed to a super block and use ext4_superblock_csum_set to calculate the checksum there. In case where the data is a group descriptor block, it will corrupt the last group descriptor, and then e2fsck will complain about it it. As all the metadata checksums should already be OK when we do the backup, remove the wrong ext4_superblock_csum_set and it should be just fine. Reported-by: "Theodore Ts'o" Signed-off-by: Tao Ma Signed-off-by: "Theodore Ts'o" [ herton: adjust context ] Signed-off-by: Herton Ronaldo Krzesinski --- fs/ext4/resize.c | 2 -- 1 file changed, 2 deletions(-) -- 1.7.9.5 diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index b0bdd10..dc1affc 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -979,8 +979,6 @@ static void update_backups(struct super_block *sb, goto exit_err; } - ext4_superblock_csum_set(sb, (struct ext4_super_block *)data); - while ((group = ext4_list_backups(sb, &three, &five, &seven)) < last) { struct buffer_head *bh;