diff options
Diffstat (limited to 'libbcachefs/alloc_foreground.h')
-rw-r--r-- | libbcachefs/alloc_foreground.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libbcachefs/alloc_foreground.h b/libbcachefs/alloc_foreground.h index 64e1f1ef..19220341 100644 --- a/libbcachefs/alloc_foreground.h +++ b/libbcachefs/alloc_foreground.h @@ -157,7 +157,9 @@ static inline void bch2_alloc_sectors_done_inlined(struct bch_fs *c, struct writ unsigned i; open_bucket_for_each(c, &wp->ptrs, ob, i) - ob_push(c, !ob->sectors_free ? &ptrs : &keep, ob); + ob_push(c, ob->sectors_free < block_sectors(c) + ? &ptrs + : &keep, ob); wp->ptrs = keep; mutex_unlock(&wp->lock); |