summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-09-23 18:42:39 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-09-27 21:46:34 -0400
commitc6040447c56496f4929db2d73ee445d898dd8a98 (patch)
treecd85d08bd0fd537e2599cfb6d60fc5495d37a2cf /fs
parent18c520f408fa8f4b7379a108b1676052e82677aa (diff)
downloadlwn-c6040447c56496f4929db2d73ee445d898dd8a98.tar.gz
lwn-c6040447c56496f4929db2d73ee445d898dd8a98.zip
bcachefs: Fix srcu warning in check_topology
check_topology doesn't need the srcu lock and doesn't use normal btree transactions - we can just drop the srcu lock. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r--fs/bcachefs/btree_gc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/btree_gc.c b/fs/bcachefs/btree_gc.c
index b5e0692f03c6..40b08fef3c39 100644
--- a/fs/bcachefs/btree_gc.c
+++ b/fs/bcachefs/btree_gc.c
@@ -513,6 +513,8 @@ int bch2_check_topology(struct bch_fs *c)
struct bpos pulled_from_scan = POS_MIN;
int ret = 0;
+ bch2_trans_srcu_unlock(trans);
+
for (unsigned i = 0; i < btree_id_nr_alive(c) && !ret; i++) {
struct btree_root *r = bch2_btree_id_root(c, i);
bool reconstructed_root = false;