diff options
author | Chao Yu <yuchao0@huawei.com> | 2020-03-30 18:03:15 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2020-03-30 20:46:25 -0700 |
commit | 7496affa3258e6d0e5fbf84bd031fd5a23f43289 (patch) | |
tree | 77395756a6d40d18f13d423543868f403733e692 /fs/f2fs | |
parent | db251553c752173371d1d8bcf4a3d58d2ce9e6dd (diff) |
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 <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/data.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 24643680489b..cdf2f626bea7 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -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++) { |