summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/md/bcache/alloc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/md/bcache/alloc.c b/drivers/md/bcache/alloc.c
index 7f2fa47da286..ebd7e909114c 100644
--- a/drivers/md/bcache/alloc.c
+++ b/drivers/md/bcache/alloc.c
@@ -1334,9 +1334,8 @@ struct open_bucket *bch_alloc_sectors_start(struct cache_set *c,
struct closure *cl)
{
struct open_bucket *ob;
- unsigned open_buckets_reserved = allocation_is_metadata(reserve)
- ? 0
- : BTREE_NODE_RESERVE;
+ unsigned open_buckets_reserved = wp == &c->btree_write_point
+ ? 0 : BTREE_NODE_RESERVE;
int ret;
BUG_ON(!wp->group);