From e8ee5cc733319496cbe8a97bc75ccdb6058d2da7 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sun, 9 Jul 2023 13:49:34 -0400 Subject: [PATCH] bcachefs: Fix try_decrease_writepoints() We were freeing open buckets on the writepoint list, but forgetting to take them off the writepoint list - whoops Signed-off-by: Kent Overstreet --- fs/bcachefs/alloc_foreground.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/bcachefs/alloc_foreground.c b/fs/bcachefs/alloc_foreground.c index 06bfcc5a498a..fcb7311b1844 100644 --- a/fs/bcachefs/alloc_foreground.c +++ b/fs/bcachefs/alloc_foreground.c @@ -1193,6 +1193,7 @@ static bool try_decrease_writepoints(struct btree_trans *trans, unsigned old_nr) bch2_trans_mutex_lock_norelock(trans, &wp->lock); open_bucket_for_each(c, &wp->ptrs, ob, i) open_bucket_free_unused(c, ob); + wp->ptrs.nr = 0; mutex_unlock(&wp->lock); return true; }