ref: d9ca5ea27b833522557cbcd2b382d01a14866c76
parent: fb46550c54e6efbcd5ceb7f86d88e89ca9f1cee3
parent: 6e0a9f748f820da22b1dfcb8ddf12b2247409f5d
author: Grzegorz Kostka <[email protected]>
date: Sun Oct 8 18:51:51 EDT 2017
Merge pull request #31 from raandoom/assert_release Move function call outside assert()
--- a/src/ext4_journal.c
+++ b/src/ext4_journal.c
@@ -1331,9 +1331,10 @@
jbd_buf->block_rec->trans == trans)) {
int r;
struct ext4_block jbd_block = EXT4_BLOCK_ZERO();
- ext4_assert(jbd_block_get(journal->jbd_fs,
+ r = jbd_block_get(journal->jbd_fs,
&jbd_block,
- jbd_buf->jbd_lba) == EOK);
+ jbd_buf->jbd_lba);
+ ext4_assert(r == EOK);
memcpy(tmp_data, jbd_block.data,
journal->block_size);
ext4_block_set(fs->bdev, &jbd_block);
@@ -1554,12 +1555,15 @@
jbd_buf_dirty);
if (jbd_buf) {
if (!revoke) {
- ext4_assert(ext4_block_get_noread(fs->bdev,
+ int r;
+ r = ext4_block_get_noread(fs->bdev,
&block,
- block_rec->lba) == EOK);
- ext4_assert(jbd_block_get(journal->jbd_fs,
+ block_rec->lba);
+ ext4_assert(r == EOK);
+ r = jbd_block_get(journal->jbd_fs,
&jbd_block,
- jbd_buf->jbd_lba) == EOK);
+ jbd_buf->jbd_lba);
+ ext4_assert(r == EOK);
memcpy(block.data, jbd_block.data,
journal->block_size);