Commit 8b2b9d11 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix error handling in gc

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 6122ab63
...@@ -261,15 +261,14 @@ static int bch2_gc_btree(struct bch_fs *c, enum btree_id btree_id, ...@@ -261,15 +261,14 @@ static int bch2_gc_btree(struct bch_fs *c, enum btree_id btree_id,
return ret; return ret;
mutex_lock(&c->btree_root_lock); mutex_lock(&c->btree_root_lock);
b = c->btree_roots[btree_id].b; b = c->btree_roots[btree_id].b;
if (!btree_node_fake(b)) if (!btree_node_fake(b))
bch2_gc_mark_key(c, bkey_i_to_s_c(&b->key), ret = bch2_gc_mark_key(c, bkey_i_to_s_c(&b->key),
&max_stale, initial); &max_stale, initial);
gc_pos_set(c, gc_pos_btree_root(b->btree_id)); gc_pos_set(c, gc_pos_btree_root(b->btree_id));
mutex_unlock(&c->btree_root_lock); mutex_unlock(&c->btree_root_lock);
return 0;
return ret;
} }
static inline int btree_id_gc_phase_cmp(enum btree_id l, enum btree_id r) static inline int btree_id_gc_phase_cmp(enum btree_id l, enum btree_id r)
......
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