From: Minjie Du Date: Mon, 17 Jul 2023 07:16:22 +0000 (+0800) Subject: btrfs: use folio_next_index() helper in extent_write_cache_pages X-Git-Tag: v6.6.7~1678^2~128 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7b365a2a3d31cc523ad24f2147285c3707297ce8;p=platform%2Fkernel%2Flinux-starfive.git btrfs: use folio_next_index() helper in extent_write_cache_pages Simplify code pattern of 'folio->index + folio_nr_pages(folio)' by using the existing helper folio_next_index(). Reviewed-by: Johannes Thumshirn Signed-off-by: Minjie Du Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 90ad300..91fba78 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2150,7 +2150,7 @@ retry: 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