aboutsummaryrefslogtreecommitdiff
path: root/fs/bcachefs/subvolume.c
diff options
context:
space:
mode:
authorGravatar Kent Overstreet <kent.overstreet@gmail.com> 2022-08-15 14:01:56 -0400
committerGravatar Kent Overstreet <kent.overstreet@linux.dev> 2023-10-22 17:09:38 -0400
commitc59d66b51b11064f17d87d5b9695e0216b8ade99 (patch)
tree739b0ae7eea76ce1b8bb83f2dc8fd907515437e8 /fs/bcachefs/subvolume.c
parentbcachefs: Increment restart count in bch2_trans_begin() (diff)
downloadlinux-c59d66b51b11064f17d87d5b9695e0216b8ade99.tar.gz
linux-c59d66b51b11064f17d87d5b9695e0216b8ade99.tar.bz2
linux-c59d66b51b11064f17d87d5b9695e0216b8ade99.zip
bcachefs: Fix bch2_fs_check_snapshots()
We were iterating starting at BCACHEFS_ROOT_INO, but snapshots start at POS_MIN - meaning this code was never getting run. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Reported-by: Olexa Bilaniuk <obilaniu@gmail.com>
Diffstat (limited to 'fs/bcachefs/subvolume.c')
-rw-r--r--fs/bcachefs/subvolume.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/subvolume.c b/fs/bcachefs/subvolume.c
index 24244bc3d2fb..fb3f8e4074c7 100644
--- a/fs/bcachefs/subvolume.c
+++ b/fs/bcachefs/subvolume.c
@@ -278,8 +278,8 @@ int bch2_fs_check_snapshots(struct bch_fs *c)
bch2_trans_init(&trans, c, 0, 0);
- ret = for_each_btree_key_commit(&trans, iter, BTREE_ID_snapshots,
- POS(BCACHEFS_ROOT_INO, 0),
+ ret = for_each_btree_key_commit(&trans, iter,
+ BTREE_ID_snapshots, POS_MIN,
BTREE_ITER_PREFETCH, k,
NULL, NULL, BTREE_INSERT_LAZY_RW|BTREE_INSERT_NOFAIL,
check_snapshot(&trans, &iter, k));