Commit 3b3e9e50 authored by Kent Overstreet's avatar Kent Overstreet

bcache: Don't return -EINTR when insert finished

We need to return -EINTR after a split because we invalidated iterators
(and freed the btree node) - but if we were finished inserting, we don't
want to redo the traversal.
Signed-off-by: default avatarKent Overstreet <kmo@daterainc.com>
parent e0a985a4
......@@ -2002,8 +2002,10 @@ static int bch_btree_insert_node(struct btree *b, struct btree_op *op,
return -EINTR;
} else {
/* Invalidated all iterators */
return btree_split(b, op, insert_keys, replace_key) ?:
-EINTR;
int ret = btree_split(b, op, insert_keys, replace_key);
return bch_keylist_empty(insert_keys) ?
0 : ret ?: -EINTR;
}
} else {
BUG_ON(write_block(b) != btree_bset_last(b));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment