mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-31 16:38:12 +00:00
mm/memcontrol.c: make cgroup_memory_noswap static
cgroup_memory_noswap is only used in mm/memcontrol.c, therefore just make it static, and remove export in include/linux/memcontrol.h Link: https://lkml.kernel.org/r/20220421124736.62180-1-lujialin4@huawei.com Signed-off-by: Lu Jialin <lujialin4@huawei.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Shakeel Butt <shakeelb@google.com> Acked-by: Roman Gushchin <roman.gushchin@linux.dev> Reviewed-by: Muchun Song <songmuchun@bytedance.com> Cc: Michal Hocko <mhocko@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
9c946e3e7f
commit
ef7a4ffc4c
2 changed files with 1 additions and 5 deletions
|
@ -937,10 +937,6 @@ struct mem_cgroup *mem_cgroup_get_oom_group(struct task_struct *victim,
|
|||
struct mem_cgroup *oom_domain);
|
||||
void mem_cgroup_print_oom_group(struct mem_cgroup *memcg);
|
||||
|
||||
#ifdef CONFIG_MEMCG_SWAP
|
||||
extern bool cgroup_memory_noswap;
|
||||
#endif
|
||||
|
||||
void folio_memcg_lock(struct folio *folio);
|
||||
void folio_memcg_unlock(struct folio *folio);
|
||||
void lock_page_memcg(struct page *page);
|
||||
|
|
|
@ -89,7 +89,7 @@ static bool cgroup_memory_nokmem __ro_after_init;
|
|||
|
||||
/* Whether the swap controller is active */
|
||||
#ifdef CONFIG_MEMCG_SWAP
|
||||
bool cgroup_memory_noswap __ro_after_init;
|
||||
static bool cgroup_memory_noswap __ro_after_init;
|
||||
#else
|
||||
#define cgroup_memory_noswap 1
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue