Commit f567adb0 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim

f2fs: fix to wait GCed compressed page writeback

like we did for encrypted page.
Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent ffcde4b2
...@@ -1152,6 +1152,13 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc, ...@@ -1152,6 +1152,13 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc,
f2fs_set_compressed_page(cc->cpages[i], inode, f2fs_set_compressed_page(cc->cpages[i], inode,
cc->rpages[i + 1]->index, cic); cc->rpages[i + 1]->index, cic);
fio.compressed_page = cc->cpages[i]; fio.compressed_page = cc->cpages[i];
fio.old_blkaddr = data_blkaddr(dn.inode, dn.node_page,
dn.ofs_in_node + i + 1);
/* wait for GCed page writeback via META_MAPPING */
f2fs_wait_on_block_writeback(inode, fio.old_blkaddr);
if (fio.encrypted) { if (fio.encrypted) {
fio.page = cc->rpages[i + 1]; fio.page = cc->rpages[i + 1];
err = f2fs_encrypt_one_page(&fio); err = f2fs_encrypt_one_page(&fio);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment