bcachefs: Improve bch2_assert_pos_locked()
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 19 May 2024 21:52:12 +0000 (17:52 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 20 May 2024 09:37:26 +0000 (05:37 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_iter.c

index 5bf98cb8b15da6ba885158e7ea90bc7d0f47801e..d3bcb4e4e23060417abfce011554c1f90341509e 100644 (file)
@@ -332,6 +332,8 @@ out:
 void bch2_assert_pos_locked(struct btree_trans *trans, enum btree_id id,
                            struct bpos pos, bool key_cache)
 {
+       bch2_trans_verify_not_unlocked(trans);
+
        struct btree_path *path;
        struct trans_for_each_path_inorder_iter iter;
        struct printbuf buf = PRINTBUF;