summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Kostka <kostka.grzegorz@gmail.com>2018-12-03 02:34:40 +0100
committerGitHub <noreply@github.com>2018-12-03 02:34:40 +0100
commit6176f0aa46bc28e6f20626c71cceed3408684e5e (patch)
tree514b53243d5fe7a1b0ce20063ea0904ec6f7c87d
parente4339496535732641e59343d807e9e436134a980 (diff)
parentd1f4f6d1631975e7d01ef8d471188f3a8d26e93d (diff)
Merge pull request #47 from MaskRay/jbd_commit_header
Fix jbd_commit_header::chksum_{type,size}
-rw-r--r--src/ext4_journal.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ext4_journal.c b/src/ext4_journal.c
index a92913a..9d998a1 100644
--- a/src/ext4_journal.c
+++ b/src/ext4_journal.c
@@ -267,9 +267,9 @@ static uint32_t jbd_commit_csum(struct jbd_fs *jbd_fs,
uint32_t checksum = 0;
if (jbd_has_csum(&jbd_fs->sb)) {
- uint32_t orig_checksum_type = header->chksum_type,
- orig_checksum_size = header->chksum_size,
- orig_checksum = header->chksum[0];
+ uint8_t orig_checksum_type = header->chksum_type,
+ orig_checksum_size = header->chksum_size;
+ uint32_t orig_checksum = header->chksum[0];
uint32_t block_size = jbd_get32(&jbd_fs->sb, blocksize);
header->chksum_type = 0;
header->chksum_size = 0;
@@ -1788,8 +1788,8 @@ static int jbd_trans_write_commit_block(struct jbd_trans *trans)
if (JBD_HAS_INCOMPAT_FEATURE(&journal->jbd_fs->sb,
JBD_FEATURE_COMPAT_CHECKSUM)) {
- jbd_set32(header, chksum_type, JBD_CRC32_CHKSUM);
- jbd_set32(header, chksum_size, JBD_CRC32_CHKSUM_SIZE);
+ header->chksum_type = JBD_CRC32_CHKSUM;
+ header->chksum_size = JBD_CRC32_CHKSUM_SIZE;
jbd_set32(header, chksum[0], trans->data_csum);
}
jbd_commit_csum_set(journal->jbd_fs, header);