diff options
| author | Kent Overstreet <[email protected]> | 2023-03-11 15:52:37 -0500 |
|---|---|---|
| committer | Kent Overstreet <[email protected]> | 2023-10-22 17:09:57 -0400 |
| commit | 46e14854fca4a262a823079c1958a204f983fa4e (patch) | |
| tree | 85235d05817d5c0326d60119606de1706045ea4d | |
| parent | fba053d2aaca8f9a4486e865452d80245a8cc215 (diff) | |
bcachefs: Fix next_bucket()
This fixes an infinite loop in bch2_get_key_or_real_bucket_hole().
Signed-off-by: Kent Overstreet <[email protected]>
| -rw-r--r-- | fs/bcachefs/alloc_background.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c index ce0ea4886288..e5abe6406afe 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; |