summaryrefslogtreecommitdiff
path: root/fs/bcachefs/journal_reclaim.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-05-25 21:57:06 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:08:40 +0300
commit00b8ccf7074fddb5607a26673f331ceac2ecd319 (patch)
tree2d8468865754bd7075b2370706423c4fcf70b450 /fs/bcachefs/journal_reclaim.c
parentc823c3390bd2f325f78bab493f84ea8a84f5ddc2 (diff)
downloadlinux-00b8ccf7074fddb5607a26673f331ceac2ecd319.tar.xz
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 <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal_reclaim.c')
-rw-r--r--fs/bcachefs/journal_reclaim.c2
1 files changed, 1 insertions, 1 deletions
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;