/* On external journals the journal blocks are identity-mapped, so this is a no-op. If needed, we can use j_blk_offset - everything is ready.  */
int journal_bmap(journal_t *journal, unsigned int blocknr, unsigned int *retp)
/* On external journals the journal blocks are identity-mapped, so this is a no-op. If needed, we can use j_blk_offset - everything is ready.  */
int journal_bmap(journal_t *journal, unsigned int blocknr, unsigned int *retp)
{
	int err = 0;
	unsigned int ret;
	if (journal->j_inode) {
		ret = bmap(journal->j_inode, blocknr);
		if (ret)
			*retp = ret;
		else {
			char b[BDEVNAME_SIZE];
			printk(KERN_ALERT "%s: journal block not found "
					"at offset %u on %s\n",
				__func__,
				blocknr,
				bdevname(journal->j_dev, b));
			err = -EIO;
			__journal_abort_soft(journal, err);
		}
	} else {
		*retp = blocknr;
	}
	return err;
}