/* Pick up the last hashvalue from an intermediate node.  */
STATIC uint xfs_da_node_lasthash(xfs_dabuf_t *bp, int *count)
/* Pick up the last hashvalue from an intermediate node.  */
STATIC uint xfs_da_node_lasthash(xfs_dabuf_t *bp, int *count)
{
	xfs_da_intnode_t *node;
	node = bp->data;
	ASSERT(be16_to_cpu(node->hdr.info.magic) == XFS_DA_NODE_MAGIC);
	if (count)
		*count = be16_to_cpu(node->hdr.count);
	if (!node->hdr.count)
		return(0);
	return be32_to_cpu(node->btree[be16_to_cpu(node->hdr.count)-1].hashval);
}