jbd2: move superblock checksum calculation to jbd2_write_superblock()
authorTheodore Ts'o <tytso@mit.edu>
Mon, 1 Jul 2013 12:12:38 +0000 (08:12 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Jul 2013 00:16:06 +0000 (17:16 -0700)
commitc1582fec20b0ca141667523a2a0e2cb488712087
treee1b9e2818a8436a3b32bfd41797bc73a4a980666
parentb5e43b9f02d5f4e57d8cda1d0ece194e595027ab
jbd2: move superblock checksum calculation to jbd2_write_superblock()

commit fe52d17cdd343ac43c85cf72940a58865b9d3bfb upstream.

Some of the functions which modify the jbd2 superblock were not
updating the checksum before calling jbd2_write_superblock().  Move
the call to jbd2_superblock_csum_set() to jbd2_write_superblock(), so
that the checksum is calculated consistently.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/jbd2/journal.c