From 00b8ccf7074fddb5607a26673f331ceac2ecd319 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Mon, 25 May 2020 14:57:06 -0400 Subject: bcachefs: Interior btree updates are now fully transactional We now update the alloc info (bucket sector counts) atomically with journalling the update to the interior btree nodes, and we also set new btree roots atomically with the journalled part of the btree update. Signed-off-by: Kent Overstreet Signed-off-by: Kent Overstreet --- fs/bcachefs/journal_reclaim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/bcachefs/journal_reclaim.c') diff --git a/fs/bcachefs/journal_reclaim.c b/fs/bcachefs/journal_reclaim.c index 341106ab4a77..6cb37045cf68 100644 --- a/fs/bcachefs/journal_reclaim.c +++ b/fs/bcachefs/journal_reclaim.c @@ -330,7 +330,7 @@ static void bch2_journal_pin_add_locked(struct journal *j, u64 seq, __journal_pin_drop(j, pin); - BUG_ON(!atomic_read(&pin_list->count)); + BUG_ON(!atomic_read(&pin_list->count) && seq == journal_last_seq(j)); atomic_inc(&pin_list->count); pin->seq = seq; -- cgit v1.2.3