/* Get current search key. For level 0 we don't actually have a key structure so we make one up from the record. For all other levels we just return the right key.  */
STATIC union xfs_btree_key* xfs_lookup_get_search_key(struct xfs_btree_cur *cur, int level, int keyno, struct xfs_btree_block *block, union xfs_btree_key *kp)
/* Get current search key. For level 0 we don't actually have a key structure so we make one up from the record. For all other levels we just return the right key.  */
STATIC union xfs_btree_key* xfs_lookup_get_search_key(struct xfs_btree_cur *cur, int level, int keyno, struct xfs_btree_block *block, union xfs_btree_key *kp)
{
	if (level == 0) {
		cur->bc_ops->init_key_from_rec(kp,
				xfs_btree_rec_addr(cur, keyno, block));
		return kp;
	}
	return xfs_btree_key_addr(cur, keyno, block);
}