diff options
Diffstat (limited to 'fs/bcachefs/btree_node_scan.c')
-rw-r--r-- | fs/bcachefs/btree_node_scan.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_node_scan.c b/fs/bcachefs/btree_node_scan.c index 365808b4b7c0..42c9eb2c786e 100644 --- a/fs/bcachefs/btree_node_scan.c +++ b/fs/bcachefs/btree_node_scan.c @@ -226,15 +226,17 @@ static int read_btree_nodes_worker(void *p) struct bch_fs *c = container_of(w->f, struct bch_fs, found_btree_nodes); struct bch_dev *ca = w->ca; unsigned long last_print = jiffies; + struct btree *b = NULL; + struct bio *bio = NULL; - struct btree *b = __bch2_btree_node_mem_alloc(c); + b = __bch2_btree_node_mem_alloc(c); if (!b) { bch_err(c, "read_btree_nodes_worker: error allocating buf"); w->f->ret = -ENOMEM; goto err; } - struct bio *bio = bio_alloc(NULL, buf_pages(b->data, c->opts.btree_node_size), 0, GFP_KERNEL); + bio = bio_alloc(NULL, buf_pages(b->data, c->opts.btree_node_size), 0, GFP_KERNEL); if (!bio) { bch_err(c, "read_btree_nodes_worker: error allocating bio"); w->f->ret = -ENOMEM; |