lkml.org 
[lkml]   [2021]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 4/4] mm/swap: remove unused global variable nr_swapper_spaces
Date
Since commit b6038942480e ("mm: memcg: add swapcache stat for memcg v2"),
the last user of nr_swapper_spaces is gone. So we remove this unused one.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
mm/swap_state.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/mm/swap_state.c b/mm/swap_state.c
index 1a2ba4056f37..b5a3dc8f47a1 100644
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -37,7 +37,6 @@ static const struct address_space_operations swap_aops = {
};

struct address_space *swapper_spaces[MAX_SWAPFILES] __read_mostly;
-static unsigned int nr_swapper_spaces[MAX_SWAPFILES] __read_mostly;
static bool enable_vma_readahead __read_mostly = true;

#define SWAP_RA_WIN_SHIFT (PAGE_SHIFT / 2)
@@ -685,7 +684,6 @@ int init_swap_address_space(unsigned int type, unsigned long nr_pages)
/* swap cache doesn't use writeback related tags */
mapping_set_no_writeback_tags(space);
}
- nr_swapper_spaces[type] = nr;
swapper_spaces[type] = spaces;

return 0;
@@ -694,7 +692,6 @@ int init_swap_address_space(unsigned int type, unsigned long nr_pages)
void exit_swap_address_space(unsigned int type)
{
kvfree(swapper_spaces[type]);
- nr_swapper_spaces[type] = 0;
swapper_spaces[type] = NULL;
}

--
2.23.0
\
 
 \ /
  Last update: 2021-05-20 15:41    [W:0.043 / U:1.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site