Commit 4c773a44 authored by Matthew Wilcox (Oracle)'s avatar Matthew Wilcox (Oracle) Committed by Andrew Morton

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.orgSigned-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent bc7996c8
...@@ -73,11 +73,11 @@ void *get_shadow_from_swap_cache(swp_entry_t entry) ...@@ -73,11 +73,11 @@ void *get_shadow_from_swap_cache(swp_entry_t entry)
{ {
struct address_space *address_space = swap_address_space(entry); struct address_space *address_space = swap_address_space(entry);
pgoff_t idx = swp_offset(entry); pgoff_t idx = swp_offset(entry);
struct page *page; void *shadow;
page = xa_load(&address_space->i_pages, idx); shadow = xa_load(&address_space->i_pages, idx);
if (xa_is_value(page)) if (xa_is_value(shadow))
return page; return shadow;
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment