]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
bcachefs: Assert we're not in a restart in bch2_trans_put()
authorKent Overstreet <kent.overstreet@linux.dev>
Tue, 15 Oct 2024 03:33:57 +0000 (23:33 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 21 Dec 2024 06:36:16 +0000 (01:36 -0500)
This always indicates a transaction restart handling bug

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_iter.c

index 07bce85dafaff1aec0f768812eab51a22f2a8d1b..98375c66021a3f18ad473bdd965b5c2d0b726c81 100644 (file)
@@ -3261,6 +3261,9 @@ void bch2_trans_put(struct btree_trans *trans)
 {
        struct bch_fs *c = trans->c;
 
+       if (trans->restarted)
+               bch2_trans_in_restart_error(trans);
+
        bch2_trans_unlock(trans);
 
        trans_for_each_update(trans, i)