Re: [PATCH] ext4: return an error when a journal block is not mapped

From: Markus Elfring

Date: Thu Oct 08 2026 - 04:39:47 EST


…
> +++ b/fs/ext4/super.c
> @@ -5967,7 +5967,7 @@ static int ext4_journal_bmap(journal_t *journal, sector_t *block)
> "journal bmap failed: block %llu ret %d\n",
> *block, ret);
> jbd2_journal_abort(journal, ret ? ret : -EFSCORRUPTED);
> - return ret;
> + return ret ? ret : -EFSCORRUPTED;
> }
> *block = map.m_pblk;
> return 0;

Would you expect that an optimiser will avoid a duplicate expression here?
How do you think about to adjust this implementation detail another bit?

Regards,
Markus