diff options
-rw-r--r-- | fs/bcachefs/compress.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/bcachefs/compress.c b/fs/bcachefs/compress.c index 42ae4cfdcb6b..6b5b61f10fcb 100644 --- a/fs/bcachefs/compress.c +++ b/fs/bcachefs/compress.c @@ -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; |