[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <702b6eb1-0eb1-4f52-a709-b685a24c4c99@linux.dev>
Date: Mon, 3 Jun 2024 14:04:48 +0800
From: Chengming Zhou <chengming.zhou@...ux.dev>
To: Yosry Ahmed <yosryahmed@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: Johannes Weiner <hannes@...xchg.org>, Nhat Pham <nphamcs@...il.com>,
Matthew Wilcox <willy@...radead.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] mm :zswap: use kmap_local_folio() in zswap_load()
On 2024/5/24 11:38, Yosry Ahmed wrote:
> Eliminate the last explicit 'struct page' reference in mm/zswap.c.
>
> Signed-off-by: Yosry Ahmed <yosryahmed@...gle.com>
LGTM, thanks!
Reviewed-by: Chengming Zhou <chengming.zhou@...ux.dev>
> ---
> mm/zswap.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/mm/zswap.c b/mm/zswap.c
> index 3693df96c81fe..bac66991fb14e 100644
> --- a/mm/zswap.c
> +++ b/mm/zswap.c
> @@ -1551,7 +1551,6 @@ bool zswap_load(struct folio *folio)
> {
> swp_entry_t swp = folio->swap;
> pgoff_t offset = swp_offset(swp);
> - struct page *page = &folio->page;
> bool swapcache = folio_test_swapcache(folio);
> struct xarray *tree = swap_zswap_tree(swp);
> struct zswap_entry *entry;
> @@ -1582,7 +1581,7 @@ bool zswap_load(struct folio *folio)
> if (entry->length)
> zswap_decompress(entry, folio);
> else {
> - dst = kmap_local_page(page);
> + dst = kmap_local_folio(folio, 0);
> zswap_fill_page(dst, entry->value);
> kunmap_local(dst);
> }
Powered by blists - more mailing lists