Explorar o código

Merge tag 'ext4_for_linus_urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

Pull ext4 bugfix from Ted Ts'o:
 "Fix an ext4 metadata checksum regression introduced in v3.18-rc3"

* tag 'ext4_for_linus_urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  jbd2: fix regression where we fail to initialize checksum seed when loading
Linus Torvalds %!s(int64=10) %!d(string=hai) anos
pai
achega
3a18ca0613
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      fs/jbd2/journal.c

+ 2 - 3
fs/jbd2/journal.c

@@ -1853,13 +1853,12 @@ int jbd2_journal_set_features (journal_t *journal, unsigned long compat,
 				journal->j_chksum_driver = NULL;
 				journal->j_chksum_driver = NULL;
 				return 0;
 				return 0;
 			}
 			}
-		}
 
 
-		/* Precompute checksum seed for all metadata */
-		if (jbd2_journal_has_csum_v2or3(journal))
+			/* Precompute checksum seed for all metadata */
 			journal->j_csum_seed = jbd2_chksum(journal, ~0,
 			journal->j_csum_seed = jbd2_chksum(journal, ~0,
 							   sb->s_uuid,
 							   sb->s_uuid,
 							   sizeof(sb->s_uuid));
 							   sizeof(sb->s_uuid));
+		}
 	}
 	}
 
 
 	/* If enabling v1 checksums, downgrade superblock */
 	/* If enabling v1 checksums, downgrade superblock */