truncate: Skip known-truncated indices
If we've truncated an entire folio, we can skip over all the indices covered by this folio. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: William Kucharski <william.kucharski@oracle.com>
This commit is contained in:
Родитель
1e84a3d997
Коммит
ccbbf761d4
|
@ -408,6 +408,7 @@ void truncate_inode_pages_range(struct address_space *mapping,
|
|||
folio_wait_writeback(folio);
|
||||
truncate_inode_folio(mapping, folio);
|
||||
folio_unlock(folio);
|
||||
index = folio_index(folio) + folio_nr_pages(folio) - 1;
|
||||
}
|
||||
truncate_exceptional_pvec_entries(mapping, &pvec, indices);
|
||||
pagevec_release(&pvec);
|
||||
|
|
Загрузка…
Ссылка в новой задаче