diff options
author | Anton Vorontsov <anton.vorontsov@linaro.org> | 2012-02-06 20:29:54 +0400 |
---|---|---|
committer | Ziyan <jaraidaniel@gmail.com> | 2015-10-25 16:26:30 +0100 |
commit | ee4192d73e7e4ab5f5af937edb01767752da3365 (patch) | |
tree | 4840e4875708144d36a223dcdba48d13ffced4e9 /drivers/staging | |
parent | 7a7003ad727b25b877bf63d25e5c742d035a8cac (diff) | |
download | kernel_samsung_espresso10-ee4192d73e7e4ab5f5af937edb01767752da3365.zip kernel_samsung_espresso10-ee4192d73e7e4ab5f5af937edb01767752da3365.tar.gz kernel_samsung_espresso10-ee4192d73e7e4ab5f5af937edb01767752da3365.tar.bz2 |
staging: android/lowmemorykiller: No need for task->signal check
task->signal == NULL is not possible, so no need for these checks.
Suggested-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/android/lowmemorykiller.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c index cfc76b6..ed62ff1 100644 --- a/drivers/staging/android/lowmemorykiller.c +++ b/drivers/staging/android/lowmemorykiller.c @@ -135,19 +135,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; |