From: Kent Overstreet Date: Fri, 8 Feb 2019 19:43:53 +0000 (-0500) Subject: bcachefs: fix for unmount hang X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=736affa8bb3eeff49014dff9fd728f7ba3ffa550;p=linux.git bcachefs: fix for unmount hang Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c index 83b3445cc76fa..c44e0417af87c 100644 --- a/fs/bcachefs/alloc_background.c +++ b/fs/bcachefs/alloc_background.c @@ -1257,7 +1257,8 @@ void bch2_dev_allocator_add(struct bch_fs *c, struct bch_dev *ca) void bch2_dev_allocator_quiesce(struct bch_fs *c, struct bch_dev *ca) { - closure_wait_event(&c->freelist_wait, ca->allocator_blocked_full); + if (ca->alloc_thread) + closure_wait_event(&c->freelist_wait, ca->allocator_blocked_full); } /* stop allocator thread: */