提交 35341609 编写于 作者: A Anton Vorontsov 提交者: Greg Kroah-Hartman

staging: android/lowmemorykiller: No need for task->signal check

task->signal == NULL is not possible, so no need for these checks.
Suggested-by: NOleg Nesterov <oleg@redhat.com>
Reviewed-by: NOleg Nesterov <oleg@redhat.com>
Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: NKOSAKI Motohiro <kosaki.motohiro@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 95670001
......@@ -136,19 +136,13 @@ static int lowmem_shrink(struct shrinker *s, struct shrink_control *sc)
rcu_read_lock();
for_each_process(tsk) {
struct task_struct *p;
struct signal_struct *sig;
int oom_adj;
p = find_lock_task_mm(tsk);
if (!p)
continue;
sig = p->signal;
if (!sig) {
task_unlock(p);
continue;
}
oom_adj = sig->oom_adj;
oom_adj = p->signal->oom_adj;
if (oom_adj < min_adj) {
task_unlock(p);
continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册