/* The extent buffer returned by this has a reference taken, so it won't disappear. It may stop being the root of the tree at any time because there are no locks held.  */
struct extent_buffer* btrfs_root_node(struct btrfs_root *root)
/* The extent buffer returned by this has a reference taken, so it won't disappear. It may stop being the root of the tree at any time because there are no locks held.  */
struct extent_buffer* btrfs_root_node(struct btrfs_root *root)
{
	struct extent_buffer *eb;
	spin_lock(&root->node_lock);
	eb = root->node;
	extent_buffer_get(eb);
	spin_unlock(&root->node_lock);
	return eb;
}