/* Read the block at 'phys' which belongs to this directory inode. This function does no virtual->physical block translation - what's passed in is assumed to be a valid directory block.  */
static int ocfs2_read_dir_block_direct(struct inode *dir, u64 phys, struct buffer_head **bh)
/* Read the block at 'phys' which belongs to this directory inode. This function does no virtual->physical block translation - what's passed in is assumed to be a valid directory block.  */
static int ocfs2_read_dir_block_direct(struct inode *dir, u64 phys, struct buffer_head **bh)
{
	int ret;
	struct buffer_head *tmp = *bh;
	ret = ocfs2_read_block(INODE_CACHE(dir), phys, &tmp,
			       ocfs2_validate_dir_block);
	if (ret) {
		mlog_errno(ret);
		goto out;
	}
	if (ocfs2_supports_dir_trailer(dir)) {
		ret = ocfs2_check_dir_trailer(dir, tmp);
		if (ret) {
			if (!*bh)
				brelse(tmp);
			mlog_errno(ret);
			goto out;
		}
	}
	if (!ret && !*bh)
		*bh = tmp;
out:
	return ret;
}