/* The leaf data grows from end-to-front in the node. this returns the address of the start of the last item, which is the stop of the leaf data stack  */
static unsigned int leaf_data_end(struct btrfs_root *root, struct extent_buffer *leaf)
/* The leaf data grows from end-to-front in the node. this returns the address of the start of the last item, which is the stop of the leaf data stack  */
static unsigned int leaf_data_end(struct btrfs_root *root, struct extent_buffer *leaf)
{
	u32 nr = btrfs_header_nritems(leaf);
	if (nr == 0)
		return BTRFS_LEAF_DATA_SIZE(root);
	return btrfs_item_offset_nr(leaf, nr - 1);
}