summaryrefslogtreecommitdiff
path: root/libbcachefs/movinggc.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-02-28 17:56:28 -0500
committerKent Overstreet <kent.overstreet@gmail.com>2018-02-28 17:57:55 -0500
commit1991277c8e723b018c90523949e8242692810911 (patch)
tree790b44b133642700cf692a00bc1713b86cc5564d /libbcachefs/movinggc.c
parent3a6164cdebe08db9c08d171e5fce48ef7a1683b6 (diff)
Update bcachefs sources to e7f4678827 bcachefs: fix variable shadowing in macro call
Diffstat (limited to 'libbcachefs/movinggc.c')
-rw-r--r--libbcachefs/movinggc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbcachefs/movinggc.c b/libbcachefs/movinggc.c
index ad56e039..2aa58b55 100644
--- a/libbcachefs/movinggc.c
+++ b/libbcachefs/movinggc.c
@@ -106,8 +106,8 @@ static bool have_copygc_reserve(struct bch_dev *ca)
bool ret;
spin_lock(&ca->freelist_lock);
- ret = fifo_used(&ca->free[RESERVE_MOVINGGC]) >=
- COPYGC_BUCKETS_PER_ITER(ca);
+ ret = fifo_full(&ca->free[RESERVE_MOVINGGC]) ||
+ ca->allocator_blocked;
spin_unlock(&ca->freelist_lock);
return ret;