Commit e6473691 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: fix mempool double initialization

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 8812600c
...@@ -596,11 +596,13 @@ static int __bch2_fs_compress_init(struct bch_fs *c, u64 features) ...@@ -596,11 +596,13 @@ static int __bch2_fs_compress_init(struct bch_fs *c, u64 features)
goto out; goto out;
} }
ret = mempool_init_kmalloc_pool( if (!mempool_initialized(&c->decompress_workspace)) {
&c->decompress_workspace, ret = mempool_init_kmalloc_pool(
1, decompress_workspace_size); &c->decompress_workspace,
if (ret) 1, decompress_workspace_size);
goto out; if (ret)
goto out;
}
out: out:
pr_verbose_init(c->opts, "ret %i", ret); pr_verbose_init(c->opts, "ret %i", ret);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment