Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Matthew Wilcox (Oracle) and committed by
Andrew Morton
4c773a44 bc7996c8

+4 -4
+4 -4
mm/swap_state.c
··· 73 73 { 74 74 struct address_space *address_space = swap_address_space(entry); 75 75 pgoff_t idx = swp_offset(entry); 76 - struct page *page; 76 + void *shadow; 77 77 78 - page = xa_load(&address_space->i_pages, idx); 79 - if (xa_is_value(page)) 80 - return page; 78 + shadow = xa_load(&address_space->i_pages, idx); 79 + if (xa_is_value(shadow)) 80 + return shadow; 81 81 return NULL; 82 82 } 83 83