diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2013-08-28 22:59:58 +0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2013-08-28 22:59:58 +0400 |
commit | 18a6ea1e5cc88ba36e66c193196da802b06d5cb0 (patch) | |
tree | 783980ea5139de37bbb2c01124a42c2c53a9f83b /fs/jbd2/journal.c | |
parent | d7b2a00c2e2eedf460ce2a15237f28de40412d86 (diff) | |
download | linux-18a6ea1e5cc88ba36e66c193196da802b06d5cb0.tar.xz |
jbd2: Fix endian mixing problems in the checksumming code
In the jbd2 checksumming code, explicitly declare separate variables with
endianness information so that we don't get confused and screw things up again.
Also fixes sparse warnings.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/jbd2/journal.c')
-rw-r--r-- | fs/jbd2/journal.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 02c7ad9d7a41..52032647dd4a 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -130,9 +130,10 @@ int jbd2_verify_csum_type(journal_t *j, journal_superblock_t *sb) return sb->s_checksum_type == JBD2_CRC32C_CHKSUM; } -static __u32 jbd2_superblock_csum(journal_t *j, journal_superblock_t *sb) +static __be32 jbd2_superblock_csum(journal_t *j, journal_superblock_t *sb) { - __u32 csum, old_csum; + __u32 csum; + __be32 old_csum; old_csum = sb->s_checksum; sb->s_checksum = 0; |