From 6e0a9f748f820da22b1dfcb8ddf12b2247409f5d Mon Sep 17 00:00:00 2001 From: raandoom Date: Sun, 8 Oct 2017 23:27:36 +0300 Subject: [PATCH] move function call outside assert() --- src/ext4_journal.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/ext4_journal.c b/src/ext4_journal.c index d5dada3..a92913a 100644 --- a/src/ext4_journal.c +++ b/src/ext4_journal.c @@ -1331,9 +1331,10 @@ static void jbd_journal_flush_trans(struct jbd_trans *trans) 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_trans_finish_callback(struct jbd_journal *journal, 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);