diff options
| author | Yongpeng Yang <yangyongpeng@xiaomi.com> | 2026-01-09 17:46:18 +0300 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2026-01-17 03:00:35 +0300 |
| commit | 540d34c18272d124ef3113b7dbe499304ce0023c (patch) | |
| tree | ed03a34d15f4c2eee739570dd4eaa19d8b5b6341 | |
| parent | 93ffb6c28ff180560d2d7313ac106efcd9e012b8 (diff) | |
| download | linux-540d34c18272d124ef3113b7dbe499304ce0023c.tar.xz | |
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>
| -rw-r--r-- | fs/f2fs/data.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 9b70b6d33703..7aa1cd43898f 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -2468,7 +2468,7 @@ next_folio: 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. |
