[PATCH v3 3/3] mm/swap_io.c: rename swap_writepage_* to swap_write_folio_*

Baoquan He
2026-04-15T08:57:34Z

All these swap_writepage_* functions are hanlding passed in folio, but
not page. And this renaming make them consistent with the their
counterpart swap_read_folio_* functions.

Reviewed-by: Barry Song <baohua@kernel.org>
Reviewed-by: Nhat Pham <nphamcs@gmail.com>
Signed-off-by: Baoquan He <baoquan.he@linux.dev>
---
mm/swap_io.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/mm/swap_io.c b/mm/swap_io.c
index 602e9b871b30..26f2daabb91f 100644
--- a/mm/swap_io.c
+++ b/mm/swap_io.c
@@ -370,7 +370,7 @@ static void sio_write_complete(struct kiocb *iocb, long ret)
mempool_free(sio, sio_pool);
}

-static void swap_writepage_fs(struct swap_info_struct *sis,
+static void swap_write_folio_fs(struct swap_info_struct *sis,
struct folio *folio,
struct swap_iocb **swap_plug)
{
@@ -407,7 +407,7 @@ static void swap_writepage_fs(struct swap_info_struct *sis,
*swap_plug = sio;
}

-static void swap_writepage_bdev_sync(struct swap_info_struct *sis,
+static void swap_write_folio_bdev_sync(struct swap_info_struct *sis,
struct folio *folio,
struct swap_iocb **plug)
{
@@ -428,7 +428,7 @@ static void swap_writepage_bdev_sync(struct swap_info_struct *sis,
__end_swap_bio_write(&bio);
}

-static void swap_writepage_bdev_async(struct swap_info_struct *sis,
+static void swap_write_folio_bdev_async(struct swap_info_struct *sis,
struct folio *folio,
struct swap_iocb **plug)
{
@@ -590,17 +590,17 @@ static void swap_read_folio_bdev_async(struct swap_info_struct *sis,

static const struct swap_ops bdev_fs_swap_ops = {
.read_folio = swap_read_folio_fs,
- .write_folio = swap_writepage_fs,
+ .write_folio = swap_write_folio_fs,
};

static const struct swap_ops bdev_sync_swap_ops = {
.read_folio = swap_read_folio_bdev_sync,
- .write_folio = swap_writepage_bdev_sync,
+ .write_folio = swap_write_folio_bdev_sync,
};

static const struct swap_ops bdev_async_swap_ops = {
.read_folio = swap_read_folio_bdev_async,
- .write_folio = swap_writepage_bdev_async,
+ .write_folio = swap_write_folio_bdev_async,
};

int init_swap_ops(struct swap_info_struct *sis)
--
2.52.0