summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2020-09-14 17:05:14 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2020-09-29 09:16:36 -0700
commitc68d6c8830225089c185bc5945b49afcb2e01cbf (patch)
tree92a540a30094b2afa0671f319c29f00576dd833a /fs/f2fs/super.c
parent31083031709eea6530f0551d59eecdb2e68265ef (diff)
downloadlinux-stable-c68d6c8830225089c185bc5945b49afcb2e01cbf.tar.gz
linux-stable-c68d6c8830225089c185bc5945b49afcb2e01cbf.tar.bz2
linux-stable-c68d6c8830225089c185bc5945b49afcb2e01cbf.zip
f2fs: compress: introduce cic/dic slab cache
Add two slab caches: "f2fs_cic_entry" and "f2fs_dic_entry" for memory allocation of compress_io_ctx and decompress_io_ctx structure. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 03d0b4622deb..18f914247f01 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -4054,7 +4054,12 @@ static int __init init_f2fs_fs(void)
err = f2fs_init_compress_mempool();
if (err)
goto free_bioset;
+ err = f2fs_init_compress_cache();
+ if (err)
+ goto free_compress_mempool;
return 0;
+free_compress_mempool:
+ f2fs_destroy_compress_mempool();
free_bioset:
f2fs_destroy_bioset();
free_bio_enrty_cache:
@@ -4086,6 +4091,7 @@ fail:
static void __exit exit_f2fs_fs(void)
{
+ f2fs_destroy_compress_cache();
f2fs_destroy_compress_mempool();
f2fs_destroy_bioset();
f2fs_destroy_bio_entry_cache();