summaryrefslogtreecommitdiff
path: root/mm/page-writeback.c
diff options
context:
space:
mode:
authorYuesong Li <liyuesong@vivo.com>2024-08-21 14:31:12 +0800
committerAndrew Morton <akpm@linux-foundation.org>2024-09-03 21:15:46 -0700
commit0692fad55d3c1ed3766a1e8627af15b951097894 (patch)
tree19438246cf3192a33528d6c2cb207f7a1fa03a2a /mm/page-writeback.c
parentc41a701d18efe6b8aa402efab16edbaba50c9548 (diff)
downloadlwn-0692fad55d3c1ed3766a1e8627af15b951097894.tar.gz
lwn-0692fad55d3c1ed3766a1e8627af15b951097894.zip
mm:page-writeback: use folio_next_index() helper in writeback_iter()
Simplify code pattern of 'folio->index + folio_nr_pages(folio)' by using the existing helper folio_next_index(). Link: https://lkml.kernel.org/r/20240821063112.4053157-1-liyuesong@vivo.com Signed-off-by: Yuesong Li <liyuesong@vivo.com> Cc: Matthew Wilcox <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/page-writeback.c')
-rw-r--r--mm/page-writeback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 4430ac68e4c4..f5448311c89e 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -2612,7 +2612,7 @@ struct folio *writeback_iter(struct address_space *mapping,
done:
if (wbc->range_cyclic)
- mapping->writeback_index = folio->index + folio_nr_pages(folio);
+ mapping->writeback_index = folio_next_index(folio);
folio_batch_release(&wbc->fbatch);
return NULL;
}