summaryrefslogtreecommitdiff
path: root/fs/bcachefs/btree_cache.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-08-18 22:08:12 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2024-08-22 09:07:22 +0300
commit49203a6b9d12bfd1a223a67847a631a78f1cd782 (patch)
tree457f1649919a742d6dfa06ad5a8986f50e776130 /fs/bcachefs/btree_cache.c
parent548e7f51679bf0ec3cdc2027d780c5d06a2a7ac6 (diff)
downloadlinux-49203a6b9d12bfd1a223a67847a631a78f1cd782.tar.xz
bcachefs: Fix failure to relock in btree_node_get()
discovered by new trans->locked asserts Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_cache.c')
-rw-r--r--fs/bcachefs/btree_cache.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/bcachefs/btree_cache.c b/fs/bcachefs/btree_cache.c
index f5d85b50b6f2..cc778d7e769e 100644
--- a/fs/bcachefs/btree_cache.c
+++ b/fs/bcachefs/btree_cache.c
@@ -974,6 +974,10 @@ retry:
bch2_btree_node_wait_on_read(b);
+ ret = bch2_trans_relock(trans);
+ if (ret)
+ return ERR_PTR(ret);
+
/*
* should_be_locked is not set on this path yet, so we need to
* relock it specifically: