In the second call to f2fs_map_blocks within f2fs_read_data_large_folio,
map.m_len exceeds the logical address space to be read. This patch
ensures map.m_len does not exceed the required address space.
Signed-off-by: Yongpeng Yang <yangyongpeng@xiaomi.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
ffs = NULL;
nrpages = folio_nr_pages(folio);
- for (; nrpages; nrpages--) {
+ for (; nrpages; nrpages--, max_nr_pages--) {
sector_t block_nr;
/*
* Map blocks using the previous result first.