summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-04-02 21:16:57 +0100
committerAndrew Morton <akpm@linux-foundation.org>2024-04-25 20:56:40 -0700
commit4c773a44257f1f8a88ebc2c1bf67799bb4d6f409 (patch)
tree59dc74bd6901620deb0ba3384d0f4ea96e73181c
parentbc7996c864bf58102f640474e04ec5ab04911ac1 (diff)
downloadlinux-4c773a44257f1f8a88ebc2c1bf67799bb4d6f409.tar.gz
linux-4c773a44257f1f8a88ebc2c1bf67799bb4d6f409.tar.bz2
linux-4c773a44257f1f8a88ebc2c1bf67799bb4d6f409.zip
mm: remove struct page from get_shadow_from_swap_cache
We don't actually use any parts of struct page; all we do is check the value of the pointer. So give the pointer the appropriate name & type. Link: https://lkml.kernel.org/r/20240402201659.918308-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--mm/swap_state.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/swap_state.c b/mm/swap_state.c
index 2deac23633cd..642c30d8376c 100644
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -73,11 +73,11 @@ void *get_shadow_from_swap_cache(swp_entry_t entry)
{
struct address_space *address_space = swap_address_space(entry);
pgoff_t idx = swp_offset(entry);
- struct page *page;
+ void *shadow;
- page = xa_load(&address_space->i_pages, idx);
- if (xa_is_value(page))
- return page;
+ shadow = xa_load(&address_space->i_pages, idx);
+ if (xa_is_value(shadow))
+ return shadow;
return NULL;
}