[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z_wt6M4P0nkM5y8Y@casper.infradead.org>
Date: Sun, 13 Apr 2025 22:34:32 +0100
From: Matthew Wilcox <willy@...radead.org>
To: nifan.cxl@...il.com
Cc: mcgrof@...nel.org, a.manzanares@...sung.com, dave@...olabs.net,
akpm@...ux-foundation.org, david@...hat.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, will@...nel.org,
aneesh.kumar@...nel.org, hca@...ux.ibm.com, gor@...ux.ibm.com,
linux-s390@...r.kernel.org, ziy@...dia.com,
Fan Ni <fan.ni@...sung.com>,
"Vishal Moola (Oracle)" <vishal.moola@...il.com>
Subject: Re: [PATCH v2] mm: Introduce free_folio_and_swap_cache() to replace
free_page_and_swap_cache()
On Sat, Apr 12, 2025 at 09:22:21PM -0700, nifan.cxl@...il.com wrote:
> From: Fan Ni <fan.ni@...sung.com>
>
> The function free_page_and_swap_cache() takes a struct page pointer as
> input parameter, but it will immediately convert it to folio and all
> operations following within use folio instead of page. It makes more
> sense to pass in folio directly.
>
> Introduce free_folio_and_swap_cache(), which takes folio as input to
> replace free_page_and_swap_cache(). And apply it to all occurrences
> where free_page_and_swap_cache() was used.
>
> Signed-off-by: Fan Ni <fan.ni@...sung.com>
> Reviewed-by: Zi Yan <ziy@...dia.com>
> Acked-by: Davidlohr Bueso <dave@...olabs.net>
> Reviewed-by: Vishal Moola (Oracle) <vishal.moola@...il.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@...radead.org>
> @@ -522,8 +522,8 @@ static inline void put_swap_device(struct swap_info_struct *si)
> do { (val)->freeswap = (val)->totalswap = 0; } while (0)
> /* only sparc can not include linux/pagemap.h in this file
> * so leave put_page and release_pages undeclared... */
> -#define free_page_and_swap_cache(page) \
> - put_page(page)
> +#define free_folio_and_swap_cache(folio) \
> + folio_put(folio)
Since you're respinning this patch anyway, you can delete the comment
about sparc. This file has included pagemap.h since 4ee60ec156d9
in 2021.
Powered by blists - more mailing lists