Skip to content

Commit 4c773a4

Browse files
Matthew Wilcox (Oracle)akpm00
authored andcommitted
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/[email protected] Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent bc7996c commit 4c773a4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mm/swap_state.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ void *get_shadow_from_swap_cache(swp_entry_t entry)
7373
{
7474
struct address_space *address_space = swap_address_space(entry);
7575
pgoff_t idx = swp_offset(entry);
76-
struct page *page;
76+
void *shadow;
7777

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;
8181
return NULL;
8282
}
8383

0 commit comments

Comments
 (0)