[PATCH 2/4] ceph: convert ceph_wait_until_current_writes_complete() to folios
Tal Zussman <[email protected]> Sun, 02 Aug 2026 12:50:03 -0400
| Newsgroups | org.kernel.vger.ceph-devel,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel,org.kvack.linux-mm |
|---|---|
| Message-ID | <20260802-remove-wait-on-page-writeback-v1-2-6c35d6b3ad36@columbia.edu> |
Iterate the writeback batch as folios rather than using &folios[i]->page. Use ceph_folio_snap_context() for the snap context check and folio_wait_writeback() instead of wait_on_page_writeback(). This removes one call to compound_head() and the last caller of wait_on_page_writeback(). No functional change. Signed-off-by: Tal Zussman <[email protected]> --- fs/ceph/addr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index a8ed2a14da44..f4aaf9a5f196 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -1625,7 +1625,7 @@ void ceph_wait_until_current_writes_complete(struct address_space *mapping, struct writeback_control *wbc, struct ceph_writeback_ctl *ceph_wbc) { - struct page *page; + struct folio *folio; unsigned i, nr; if (wbc->sync_mode != WB_SYNC_NONE && @@ -1640,10 +1640,10 @@ void ceph_wait_until_current_writes_complete(struct address_space *mapping, PAGECACHE_TAG_WRITEBACK, &ceph_wbc->fbatch))) { for (i = 0; i < nr; i++) { - page = &ceph_wbc->fbatch.folios[i]->page; - if (page_snap_context(page) != ceph_wbc->snapc) + folio = ceph_wbc->fbatch.folios[i]; + if (ceph_folio_snap_context(folio) != ceph_wbc->snapc) continue; - wait_on_page_writeback(page); + folio_wait_writeback(folio); } folio_batch_release(&ceph_wbc->fbatch); -- 2.39.5