mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
mm, THP, swap: unify swap slot free functions to put_swap_page
Now, get_swap_page takes struct page and allocates swap space according to page size(ie, normal or THP) so it would be more cleaner to introduce put_swap_page which is a counter function of get_swap_page. Then, it calls right swap slot free function depending on page's size. [[email protected]: minor cleanup and fix] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Minchan Kim <[email protected]> Signed-off-by: "Huang, Ying" <[email protected]> Acked-by: Johannes Weiner <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: Ebru Akagunduz <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Kirill A. Shutemov <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Shaohua Li <[email protected]> Cc: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
38d8b4e6bd
commit
75f6d6d29a
5 changed files with 21 additions and 24 deletions
|
|
@ -708,7 +708,7 @@ static int __remove_mapping(struct address_space *mapping, struct page *page,
|
|||
mem_cgroup_swapout(page, swap);
|
||||
__delete_from_swap_cache(page);
|
||||
spin_unlock_irqrestore(&mapping->tree_lock, flags);
|
||||
swapcache_free(swap);
|
||||
put_swap_page(page, swap);
|
||||
} else {
|
||||
void (*freepage)(struct page *);
|
||||
void *shadow = NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue