summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/alloc_foreground.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-07-09 13:49:34 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:10:06 -0400
commite8ee5cc733319496cbe8a97bc75ccdb6058d2da7 (patch)
tree4a29ceb8e8512fae5ff8a48c673d96e415b97562 /fs/bcachefs/alloc_foreground.c
parentdbc7deb2afc71aa466c9ed4c3cefd838d823bff7 (diff)
downloadlinux-e8ee5cc733319496cbe8a97bc75ccdb6058d2da7.tar.gz
linux-e8ee5cc733319496cbe8a97bc75ccdb6058d2da7.tar.bz2
linux-e8ee5cc733319496cbe8a97bc75ccdb6058d2da7.zip
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 <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_foreground.c')
-rw-r--r--fs/bcachefs/alloc_foreground.c1
1 files changed, 1 insertions, 0 deletions
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;
}