1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-24 17:23:25 -05:00

bcachefs: fix mempool double initialization

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2018-11-21 07:16:28 -05:00 committed by Kent Overstreet
parent 8812600c29
commit e647369168

View file

@ -596,11 +596,13 @@ have_compressed:
goto out;
}
ret = mempool_init_kmalloc_pool(
&c->decompress_workspace,
1, decompress_workspace_size);
if (ret)
goto out;
if (!mempool_initialized(&c->decompress_workspace)) {
ret = mempool_init_kmalloc_pool(
&c->decompress_workspace,
1, decompress_workspace_size);
if (ret)
goto out;
}
out:
pr_verbose_init(c->opts, "ret %i", ret);
return ret;