diff options
Diffstat (limited to 'mm/swapfile.c')
-rw-r--r-- | mm/swapfile.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c index d00523601913..f28745855772 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c | |||
@@ -571,13 +571,13 @@ int try_to_free_swap(struct page *page) | |||
571 | * Free the swap entry like above, but also try to | 571 | * Free the swap entry like above, but also try to |
572 | * free the page cache entry if it is the last user. | 572 | * free the page cache entry if it is the last user. |
573 | */ | 573 | */ |
574 | void free_swap_and_cache(swp_entry_t entry) | 574 | int free_swap_and_cache(swp_entry_t entry) |
575 | { | 575 | { |
576 | struct swap_info_struct * p; | 576 | struct swap_info_struct *p; |
577 | struct page *page = NULL; | 577 | struct page *page = NULL; |
578 | 578 | ||
579 | if (is_migration_entry(entry)) | 579 | if (is_migration_entry(entry)) |
580 | return; | 580 | return 1; |
581 | 581 | ||
582 | p = swap_info_get(entry); | 582 | p = swap_info_get(entry); |
583 | if (p) { | 583 | if (p) { |
@@ -603,6 +603,7 @@ void free_swap_and_cache(swp_entry_t entry) | |||
603 | unlock_page(page); | 603 | unlock_page(page); |
604 | page_cache_release(page); | 604 | page_cache_release(page); |
605 | } | 605 | } |
606 | return p != NULL; | ||
606 | } | 607 | } |
607 | 608 | ||
608 | #ifdef CONFIG_HIBERNATION | 609 | #ifdef CONFIG_HIBERNATION |