f2fs: start freeing cluster pages from the unused number
We can start freeing cluster page(s) from which compression is not used. It will get better performance. Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
275dd5dc67
commit
ebaaec351e
|
@ -690,9 +690,7 @@ static int f2fs_compress_pages(struct compress_ctx *cc)
|
|||
vm_unmap_ram(cc->cbuf, cc->nr_cpages);
|
||||
vm_unmap_ram(cc->rbuf, cc->cluster_size);
|
||||
|
||||
for (i = 0; i < cc->nr_cpages; i++) {
|
||||
if (i < new_nr_cpages)
|
||||
continue;
|
||||
for (i = new_nr_cpages; i < cc->nr_cpages; i++) {
|
||||
f2fs_compress_free_page(cc->cpages[i]);
|
||||
cc->cpages[i] = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue