f2fs: fix to avoid triggering IO in write path
If we are in write IO path, we need to avoid using GFP_KERNEL.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index 7489338..bd3ea01 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -656,7 +656,7 @@ static int prepare_compress_overwrite(struct compress_ctx *cc,
struct bio *bio = NULL;
ret = f2fs_read_multi_pages(cc, &bio, cc->cluster_size,
- &last_block_in_bio, false);
+ &last_block_in_bio, false, true);
f2fs_destroy_compress_ctx(cc);
if (ret)
goto release_pages;