summaryrefslogtreecommitdiff
path: root/fs/bcachefs/alloc_background.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-04-19 01:01:49 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:08:54 +0300
commit2ee47eec44f0613d6c51d88f8c820a5e8ed624a3 (patch)
tree32089e6eb74857812f93cff20124bf68983a82db /fs/bcachefs/alloc_background.h
parentbae895a5a3300c2da605dd0c841e175c4c9e5872 (diff)
downloadlinux-2ee47eec44f0613d6c51d88f8c820a5e8ed624a3.tar.xz
bcachefs: Fix for copygc getting stuck waiting for reserve to be filled
This fixes a regression from the patch bcachefs: Fix copygc dying on startup In general only the allocator thread itself should be updating ca->allocator_state, the thread waking up the allocator setting it is an ugly hack only needed to avoid racing with the copygc threads when we're first starting up. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_background.h')
-rw-r--r--fs/bcachefs/alloc_background.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/bcachefs/alloc_background.h b/fs/bcachefs/alloc_background.h
index 73e1c27c96e3..ad15a80602c0 100644
--- a/fs/bcachefs/alloc_background.h
+++ b/fs/bcachefs/alloc_background.h
@@ -100,10 +100,8 @@ static inline void bch2_wake_allocator(struct bch_dev *ca)
rcu_read_lock();
p = rcu_dereference(ca->alloc_thread);
- if (p) {
+ if (p)
wake_up_process(p);
- ca->allocator_state = ALLOCATOR_running;
- }
rcu_read_unlock();
}