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:
Vladimir Davydov 2016-03-17 14:20:34 -07:00 коммит произвёл Linus Torvalds
Родитель 8b5926560f
Коммит e0775d10f1
1 изменённых файлов: 0 добавлений и 4 удалений

Просмотреть файл

@ -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);
} }
/* /*