summaryrefslogtreecommitdiff
path: root/fs/bcachefs/snapshot.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-12-10 20:42:49 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2024-01-01 19:47:41 +0300
commit249bf593e84e0b4652d2cdb9884b97bc21b59d9f (patch)
treeef99bec99fd8a28c3fdc1338ffec3bc0bd501a8b /fs/bcachefs/snapshot.c
parentb56cee70e75e2edcbb92eb3d9357fae5df857b01 (diff)
downloadlinux-249bf593e84e0b4652d2cdb9884b97bc21b59d9f.tar.xz
bcachefs: Fix snapshot.c assertion for online fsck
c->curr_recovery_pass can go backwards; this adds a non rewinding version, c->recovery_pass_done. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/snapshot.c')
-rw-r--r--fs/bcachefs/snapshot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/snapshot.c b/fs/bcachefs/snapshot.c
index 1b1b7e76167e..8d1800ef22b5 100644
--- a/fs/bcachefs/snapshot.c
+++ b/fs/bcachefs/snapshot.c
@@ -123,7 +123,7 @@ bool __bch2_snapshot_is_ancestor(struct bch_fs *c, u32 id, u32 ancestor)
struct snapshot_table *t;
bool ret;
- EBUG_ON(c->curr_recovery_pass <= BCH_RECOVERY_PASS_check_snapshots);
+ EBUG_ON(c->recovery_pass_done <= BCH_RECOVERY_PASS_check_snapshots);
rcu_read_lock();
t = rcu_dereference(c->snapshots);