34 lines
984 B
Diff
34 lines
984 B
Diff
From 58d33a0a41804c2ab68c85fc61f79e91f4b9f98b Mon Sep 17 00:00:00 2001
|
|
From: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Date: Mon, 14 Oct 2024 23:33:57 -0400
|
|
Subject: [PATCH 059/233] bcachefs: Assert we're not in a restart in
|
|
bch2_trans_put()
|
|
Content-Type: text/plain; charset="utf-8"
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
This always indicates a transaction restart handling bug
|
|
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Signed-off-by: Alexander Miroshnichenko <alex@millerson.name>
|
|
---
|
|
fs/bcachefs/btree_iter.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c
|
|
index 07bce85dafaf..98375c66021a 100644
|
|
--- a/fs/bcachefs/btree_iter.c
|
|
+++ b/fs/bcachefs/btree_iter.c
|
|
@@ -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)
|
|
--
|
|
2.45.2
|
|
|