btrfs: increase usage of folio_next_index() helper
PATCH 1/1 btrfs: 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().
Signed-off-by Minjie Du <[email protected]>
--- fs/btrfs/extent_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/extent_io.c +1 -1
@@ -2127,7 +2127,7 @@ static int extent_write_cache_pages(struct address_space *mapping,for (i =0 ; i < nr_folios; i++) {struct folio *folio = fbatch.folios[i]; - done_index = folio->index +folio_nr_pages (folio); + done_index =folio_next_index (folio);/* * At this point we hold neither the i_pages lock nor * the page lock: the page may be truncated or
Signature · 1 line
2.39.0
Looks good,
Reviewed-by Johannes Thumshirn <[email protected]>
Quoted 4 lines · Minjie Du
Simplify code pattern of '
folio->index+folio_nr_pages(folio)' by using the existing helperfolio_next_index().Signed-off-by Minjie Du <[email protected]>
With a slightly modified subject added to misc-next, thanks.