/* After the caller of journal_get_descriptor_buffer() has finished modifying the buffer's contents they really should run flush_dcache_page(bh->b_page). But we don't bother doing that, so there will be coherency problems with mmaps of blockdevs which hold live JBD-controlled filesystems.  */
struct journal_head* journal_get_descriptor_buffer(journal_t *journal)
/* After the caller of journal_get_descriptor_buffer() has finished modifying the buffer's contents they really should run flush_dcache_page(bh->b_page). But we don't bother doing that, so there will be coherency problems with mmaps of blockdevs which hold live JBD-controlled filesystems.  */
struct journal_head* journal_get_descriptor_buffer(journal_t *journal)
{
	struct buffer_head *bh;
	unsigned int blocknr;
	int err;
	err = journal_next_log_block(journal, &blocknr);
	if (err)
		return NULL;
	bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize);
	if (!bh)
		return NULL;
	lock_buffer(bh);
	memset(bh->b_data, 0, journal->j_blocksize);
	set_buffer_uptodate(bh);
	unlock_buffer(bh);
	BUFFER_TRACE(bh, "return this buffer");
	return journal_add_journal_head(bh);
}