From: KOSAKI Motohiro Date: Tue, 26 Jul 2011 00:12:07 +0000 (-0700) Subject: mm: swap-token: makes global variables to function local X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=53bb01f593d50188c8d638f89db96f9b6b042bcd;p=~shefty%2Frdma-dev.git mm: swap-token: makes global variables to function local global_faults and last_aging are only used in grab_swap_token(). Move them into grab_swap_token(). Signed-off-by: KOSAKI Motohiro Acked-by: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/thrash.c b/mm/thrash.c index d416d403e14..42ffb017927 100644 --- a/mm/thrash.c +++ b/mm/thrash.c @@ -30,8 +30,6 @@ static DEFINE_SPINLOCK(swap_token_lock); struct mm_struct *swap_token_mm; struct mem_cgroup *swap_token_memcg; -static unsigned int global_faults; -static unsigned int last_aging; #ifdef CONFIG_CGROUP_MEM_RES_CTLR static struct mem_cgroup *swap_token_memcg_from_mm(struct mm_struct *mm) @@ -55,6 +53,8 @@ void grab_swap_token(struct mm_struct *mm) { int current_interval; unsigned int old_prio = mm->token_priority; + static unsigned int global_faults; + static unsigned int last_aging; global_faults++;