mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 04:56:13 +02:00
f2fs: avoid unnecessary block mapping lookups in f2fs_read_data_large_folio
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>
This commit is contained in:
parent
93ffb6c28f
commit
540d34c182
|
|
@ -2468,7 +2468,7 @@ static int f2fs_read_data_large_folio(struct inode *inode,
|
|||
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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user