Skip to content

Commit a12cc5b

Browse files
chaseyuJaegeuk Kim
authored andcommitted
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: 5e6bbde ("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>
1 parent a753103 commit a12cc5b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎fs/f2fs/compress.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1372,7 +1372,8 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc,
13721372
for (i = 0; i < cc->nr_cpages; i++) {
13731373
if (!cc->cpages[i])
13741374
continue;
1375-
f2fs_put_page(cc->cpages[i], 1);
1375+
f2fs_compress_free_page(cc->cpages[i]);
1376+
cc->cpages[i] = NULL;
13761377
}
13771378
out_put_cic:
13781379
kmem_cache_free(cic_entry_slab, cic);

0 commit comments

Comments
 (0)