mm: memcontrol: zap oom_info_lock
mem_cgroup_print_oom_info is always called under oom_lock, so oom_info_lock is redundant. Signed-off-by: Vladimir Davydov <vdavydov@virtuozzo.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Michal Hocko <mhocko@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Родитель
8b5926560f
Коммит
e0775d10f1
|
@ -1150,12 +1150,9 @@ static bool mem_cgroup_wait_acct_move(struct mem_cgroup *memcg)
|
||||||
*/
|
*/
|
||||||
void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p)
|
void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p)
|
||||||
{
|
{
|
||||||
/* oom_info_lock ensures that parallel ooms do not interleave */
|
|
||||||
static DEFINE_MUTEX(oom_info_lock);
|
|
||||||
struct mem_cgroup *iter;
|
struct mem_cgroup *iter;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
mutex_lock(&oom_info_lock);
|
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
|
|
||||||
if (p) {
|
if (p) {
|
||||||
|
@ -1199,7 +1196,6 @@ void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p)
|
||||||
|
|
||||||
pr_cont("\n");
|
pr_cont("\n");
|
||||||
}
|
}
|
||||||
mutex_unlock(&oom_info_lock);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Загрузка…
Ссылка в новой задаче