aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2021-05-06 17:00:43 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2021-05-11 14:48:12 -0700
commita12cc5b423d4f36dc1a1ea3911e49cf9dff43898 (patch)
tree94a3721b7f5c99c3357f5ea1f0475bc8269f13d5 /fs/f2fs
parentf2fs: support iflag change given the mask (diff)
downloadlinux-dev-a12cc5b423d4f36dc1a1ea3911e49cf9dff43898.tar.xz
linux-dev-a12cc5b423d4f36dc1a1ea3911e49cf9dff43898.zip
f2fs: compress: fix to free compress page correctly
In error path of f2fs_write_compressed_pages(), it needs to call f2fs_compress_free_page() to release temporary page. Fixes: 5e6bbde95982 ("f2fs: introduce mempool for {,de}compress intermediate page allocation") Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/compress.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index 53b13787eb2c..2acaefa10036 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -1372,7 +1372,8 @@ out_destroy_crypt:
for (i = 0; i < cc->nr_cpages; i++) {
if (!cc->cpages[i])
continue;
- f2fs_put_page(cc->cpages[i], 1);
+ f2fs_compress_free_page(cc->cpages[i]);
+ cc->cpages[i] = NULL;
}
out_put_cic:
kmem_cache_free(cic_entry_slab, cic);