Browse files

ext4: remove erroneous ext4_superblock_csum_set() in update_backups()

commit bef53b0 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" <>
Cc: Ben Hutchings <>
Signed-off-by: Greg Kroah-Hartman <>
  • Loading branch information...
1 parent 5433889 commit 5770e9ed8a5b8ae7204e6cfe52565f10395091e4 @taoma-tm taoma-tm committed with gregkh Sep 20, 2012
Showing with 0 additions and 2 deletions.
  1. +0 −2 fs/ext4/resize.c
@@ -979,8 +979,6 @@ static void update_backups(struct super_block *sb,
goto exit_err;
- ext4_superblock_csum_set(sb);
while ((group = ext4_list_backups(sb, &three, &five, &seven)) < last) {
struct buffer_head *bh;

0 comments on commit 5770e9e

Please sign in to comment.