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

From: Chris Li

Date: Sun Mar 29 2026 - 10:32:12 EST


Acked-by: Chris Li <chrisl@xxxxxxxxxx>

Chris

On Sat, Mar 28, 2026 at 12:58 AM Barry Song <21cnbao@xxxxxxxxx> wrote:
>
> From: Baoquan He <bhe@xxxxxxxxxx>
>
> 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@xxxxxxxxxx>
> Reviewed-by: Nhat Pham <nphamcs@xxxxxxxxx>
> Signed-off-by: Baoquan He <bhe@xxxxxxxxxx>
> Signed-off-by: Barry Song <baohua@xxxxxxxxxx>
> ---
> 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 ad0895af6ed8..063cd005ca0d 100644
> --- a/mm/swap_io.c
> +++ b/mm/swap_io.c
> @@ -375,7 +375,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)
> {
> @@ -412,7 +412,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)
> {
> @@ -433,7 +433,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)
> {
> @@ -595,17 +595,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,
> };
>
> void setup_swap_ops(struct swap_info_struct *sis)
> --
> 2.39.3 (Apple Git-146)
>