summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-03-11 15:52:37 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-03-14 20:27:43 -0400
commit1141c57e004b681f44e796b2b9993c3a714675a1 (patch)
tree3970d9852d23c7a12236ec1eefc1fbdfa461e36b
parent3ad64c6775e17b9f571ae5b5e97e7a7b5e2d7bee (diff)
bcachefs: Fix next_bucket()
This fixes an infinite loop in bch2_get_key_or_real_bucket_hole(). Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r--fs/bcachefs/alloc_background.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c
index 71536224611a..a64b48f6889c 100644
--- a/fs/bcachefs/alloc_background.c
+++ b/fs/bcachefs/alloc_background.c
@@ -1006,7 +1006,7 @@ static bool next_bucket(struct bch_fs *c, struct bpos *bucket)
iter = bucket->inode;
ca = __bch2_next_dev(c, &iter, NULL);
if (ca)
- bucket->offset = ca->mi.first_bucket;
+ *bucket = POS(ca->dev_idx, ca->mi.first_bucket);
rcu_read_unlock();
return ca != NULL;