Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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>
  • Loading branch information...
commit 529c9c9ed46bc291620b0d79256b83914ace67d9 1 parent a1c99ff
@enomsg enomsg authored pershoot committed
Showing with 1 addition and 7 deletions.
  1. +1 −7 drivers/staging/android/lowmemorykiller.c
View
8 drivers/staging/android/lowmemorykiller.c
@@ -136,19 +136,13 @@ static int lowmem_shrink(struct shrinker *s, int nr_to_scan, gfp_t gfp_mask)
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;

0 comments on commit 529c9c9

Please sign in to comment.
Something went wrong with that request. Please try again.