summaryrefslogtreecommitdiff
path: root/include/linux/zswap.h
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2023-07-15 05:23:40 +0100
committerAndrew Morton <akpm@linux-foundation.org>2023-08-21 13:37:26 -0700
commit34f4c198bfbe86612c368eb122002787acecaa93 (patch)
tree8960b9d5118a738e5dac62b632e68f5266b1d807 /include/linux/zswap.h
parent42c06a0e8ebe95b81e5fb41c6556ff22d9255b0c (diff)
zswap: make zswap_store() take a folio
Patch series "Followup folio conversions for zswap". With frontswap killed, it's worth converting the zswap_load() and zswap_store() functions to take a folio instead of a page pointer. They aren't converted to support large folios, but there are a lot of unnecessary calls to compound_head() that are removed by these patches. This patch (of 4): Only convert a few easy parts of this function to use the folio passed in; convert back to struct page for the majority of it. This does remove a few hidden calls to compound_head(). Link: https://lkml.kernel.org/r/20230715042343.434588-1-willy@infradead.org Link: https://lkml.kernel.org/r/20230715042343.434588-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Christoph Hellwig <hch@infradead.org> Cc: Domenico Cerasuolo <cerasuolodomenico@gmail.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Nhat Pham <nphamcs@gmail.com> Cc: Vitaly Wool <vitaly.wool@konsulko.com> Cc: Yosry Ahmed <yosryahmed@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/zswap.h')
-rw-r--r--include/linux/zswap.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/zswap.h b/include/linux/zswap.h
index 850c377d9b6d..9f318c8bc367 100644
--- a/include/linux/zswap.h
+++ b/include/linux/zswap.h
@@ -10,7 +10,7 @@ extern atomic_t zswap_stored_pages;
#ifdef CONFIG_ZSWAP
-bool zswap_store(struct page *page);
+bool zswap_store(struct folio *folio);
bool zswap_load(struct page *page);
void zswap_invalidate(int type, pgoff_t offset);
void zswap_swapon(int type);
@@ -18,7 +18,7 @@ void zswap_swapoff(int type);
#else
-static inline bool zswap_store(struct page *page)
+static inline bool zswap_store(struct folio *folio)
{
return false;
}