mm/filemap: increase usage of folio_next_index() helper

Simplify code pattern of 'folio->index + folio_nr_pages(folio)' by using
the existing helper folio_next_index() in filemap_get_folios_contig().

Link: https://lkml.kernel.org/r/20231107024635.4512-1-duminjie@vivo.com
Signed-off-by: Minjie Du <duminjie@vivo.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
Minjie Du 2023-11-07 10:46:34 +08:00 committed by Andrew Morton
parent 4eca0ef49a
commit 8ff252663d
1 changed files with 1 additions and 1 deletions

View File

@ -2173,7 +2173,7 @@ update_start:
if (nr) {
folio = fbatch->folios[nr - 1];
*start = folio->index + folio_nr_pages(folio);
*start = folio_next_index(folio);
}
out:
rcu_read_unlock();