diff --git a/mm/swapfile.c b/mm/swapfile.c index ad438a4d0e68..73065d75d0e1 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -1866,10 +1866,8 @@ swp_entry_t get_swap_page_of_type(int type) if (get_swap_device_info(si)) { if (si->flags & SWP_WRITEOK) { offset = cluster_alloc_swap_entry(si, 0, 1); - if (offset) { + if (offset) entry = swp_entry(si->type, offset); - atomic_long_dec(&nr_swap_pages); - } } put_swap_device(si); }