diff options
Diffstat (limited to 'mm/swapfile.c')
-rw-r--r-- | mm/swapfile.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c index 0883b4912ff7..8798b2e0ac59 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c | |||
@@ -843,16 +843,13 @@ void swap_free(swp_entry_t entry) | |||
843 | /* | 843 | /* |
844 | * Called after dropping swapcache to decrease refcnt to swap entries. | 844 | * Called after dropping swapcache to decrease refcnt to swap entries. |
845 | */ | 845 | */ |
846 | void swapcache_free(swp_entry_t entry, struct page *page) | 846 | void swapcache_free(swp_entry_t entry) |
847 | { | 847 | { |
848 | struct swap_info_struct *p; | 848 | struct swap_info_struct *p; |
849 | unsigned char count; | ||
850 | 849 | ||
851 | p = swap_info_get(entry); | 850 | p = swap_info_get(entry); |
852 | if (p) { | 851 | if (p) { |
853 | count = swap_entry_free(p, entry, SWAP_HAS_CACHE); | 852 | swap_entry_free(p, entry, SWAP_HAS_CACHE); |
854 | if (page) | ||
855 | mem_cgroup_uncharge_swapcache(page, entry, count != 0); | ||
856 | spin_unlock(&p->lock); | 853 | spin_unlock(&p->lock); |
857 | } | 854 | } |
858 | } | 855 | } |