Skip to content

Commit 49203a6

Browse files
author
Kent Overstreet
committed
bcachefs: Fix failure to relock in btree_node_get()
discovered by new trans->locked asserts Signed-off-by: Kent Overstreet <[email protected]>
1 parent 548e7f5 commit 49203a6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fs/bcachefs/btree_cache.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -974,6 +974,10 @@ static struct btree *__bch2_btree_node_get(struct btree_trans *trans, struct btr
974974

975975
bch2_btree_node_wait_on_read(b);
976976

977+
ret = bch2_trans_relock(trans);
978+
if (ret)
979+
return ERR_PTR(ret);
980+
977981
/*
978982
* should_be_locked is not set on this path yet, so we need to
979983
* relock it specifically:

0 commit comments

Comments
 (0)