Skip to content

Commit 7496aff

Browse files
chaseyuJaegeuk Kim
authored andcommitted
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: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent db25155 commit 7496aff

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/f2fs/data.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2048,7 +2048,8 @@ int f2fs_read_multi_pages(struct compress_ctx *cc, struct bio **bio_ret,
20482048

20492049
f2fs_bug_on(sbi, f2fs_cluster_is_empty(cc));
20502050

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

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

0 commit comments

Comments
 (0)