mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 10:45:49 +00:00
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:
parent
1e84a3d997
commit
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);
|
||||
|
Loading…
Reference in New Issue
Block a user