Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 221397fb authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim
Browse files

f2fs: fix to use f2fs_readpage_limit() in f2fs_read_multi_pages()



Multipage read flow should consider fsverity, so it needs to use
f2fs_readpage_limit() instead of i_size_read() to check EOF condition.

Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 0049e2ec
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2048,7 +2048,8 @@ int f2fs_read_multi_pages(struct compress_ctx *cc, struct bio **bio_ret,

	f2fs_bug_on(sbi, f2fs_cluster_is_empty(cc));

	last_block_in_file = (i_size_read(inode) + blocksize - 1) >> blkbits;
	last_block_in_file = (f2fs_readpage_limit(inode) +
					blocksize - 1) >> blkbits;

	/* get rid of pages beyond EOF */
	for (i = 0; i < cc->cluster_size; i++) {