Skip to content

Commit 72b0f30

Browse files
chaseyugregkh
authored andcommitted
f2fs: compress: fix to free compress page correctly
[ Upstream commit a12cc5b ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 64f3410 commit 72b0f30

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
@@ -1321,7 +1321,8 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc,
13211321
for (i = 0; i < cc->nr_cpages; i++) {
13221322
if (!cc->cpages[i])
13231323
continue;
1324-
f2fs_put_page(cc->cpages[i], 1);
1324+
f2fs_compress_free_page(cc->cpages[i]);
1325+
cc->cpages[i] = NULL;
13251326
}
13261327
out_put_cic:
13271328
kmem_cache_free(cic_entry_slab, cic);

0 commit comments

Comments
 (0)