summaryrefslogtreecommitdiff
path: root/libbcachefs/alloc_foreground.h
diff options
context:
space:
mode:
Diffstat (limited to 'libbcachefs/alloc_foreground.h')
-rw-r--r--libbcachefs/alloc_foreground.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbcachefs/alloc_foreground.h b/libbcachefs/alloc_foreground.h
index 02aef668..ae6d0aa8 100644
--- a/libbcachefs/alloc_foreground.h
+++ b/libbcachefs/alloc_foreground.h
@@ -306,7 +306,7 @@ void bch2_dev_alloc_debug_to_text(struct printbuf *, struct bch_dev *);
void __bch2_wait_on_allocator(struct bch_fs *, struct closure *);
static inline void bch2_wait_on_allocator(struct bch_fs *c, struct closure *cl)
{
- if (cl->closure_get_happened)
+ if (closure_nr_remaining(cl) > 1)
__bch2_wait_on_allocator(c, cl);
}