mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 22:14:04 +02:00
f2fs: compress: fix to free compress page correctly
[ Upstream commita12cc5b423] In error path of f2fs_write_compressed_pages(), it needs to call f2fs_compress_free_page() to release temporary page. Fixes:5e6bbde959("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>
This commit is contained in:
parent
64f3410c7b
commit
72b0f3077e
|
|
@ -1321,7 +1321,8 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc,
|
||||||
for (i = 0; i < cc->nr_cpages; i++) {
|
for (i = 0; i < cc->nr_cpages; i++) {
|
||||||
if (!cc->cpages[i])
|
if (!cc->cpages[i])
|
||||||
continue;
|
continue;
|
||||||
f2fs_put_page(cc->cpages[i], 1);
|
f2fs_compress_free_page(cc->cpages[i]);
|
||||||
|
cc->cpages[i] = NULL;
|
||||||
}
|
}
|
||||||
out_put_cic:
|
out_put_cic:
|
||||||
kmem_cache_free(cic_entry_slab, cic);
|
kmem_cache_free(cic_entry_slab, cic);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user