* [PATCH v1] mm:page-writeback:use folio_next_index() helper in writeback_iter()
@ 2024-08-21 6:31 Yuesong Li
0 siblings, 0 replies; only message in thread
From: Yuesong Li @ 2024-08-21 6:31 UTC (permalink / raw)
To: akpm, willy
Cc: linux-fsdevel, linux-mm, linux-kernel, opensource.kernel, Yuesong Li
Simplify code pattern of 'folio->index + folio_nr_pages(folio)' by using
the existing helper folio_next_index().
Signed-off-by: Yuesong Li <liyuesong@vivo.com>
---
mm/page-writeback.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 7a04cb1918fd..fcd4c1439cb9 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;
}
--
2.34.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-08-21 6:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-21 6:31 [PATCH v1] mm:page-writeback:use folio_next_index() helper in writeback_iter() Yuesong Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox