[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240524033819.1953587-3-yosryahmed@google.com>
Date: Fri, 24 May 2024 03:38:17 +0000
From: Yosry Ahmed <yosryahmed@...gle.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Johannes Weiner <hannes@...xchg.org>, Nhat Pham <nphamcs@...il.com>,
Chengming Zhou <chengming.zhou@...ux.dev>, Matthew Wilcox <willy@...radead.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Yosry Ahmed <yosryahmed@...gle.com>
Subject: [PATCH 2/3] mm :zswap: use kmap_local_folio() in zswap_load()
Eliminate the last explicit 'struct page' reference in mm/zswap.c.
Signed-off-by: Yosry Ahmed <yosryahmed@...gle.com>
---
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);
}
--
2.45.1.288.g0e0cd299f1-goog
Powered by blists - more mailing lists