/* set the private field for a given byte offset in the tree. If there isn't an extent_state there already, this does nothing.  */
int set_state_private(struct extent_io_tree *tree, u64 start, u64 private)
/* set the private field for a given byte offset in the tree. If there isn't an extent_state there already, this does nothing.  */
int set_state_private(struct extent_io_tree *tree, u64 start, u64 private)
{
	struct rb_node *node;
	struct extent_state *state;
	int ret = 0;
	spin_lock(&tree->lock);
	node = tree_search(tree, start);
	if (!node) {
		ret = -ENOENT;
		goto out;
	}
	state = rb_entry(node, struct extent_state, rb_node);
	if (state->start != start) {
		ret = -ENOENT;
		goto out;
	}
	state->private = private;
out:
	spin_unlock(&tree->lock);
	return ret;
}