Skip to content

Commit

Permalink
staging: android/lowmemorykiller: No need for task->signal check
Browse files Browse the repository at this point in the history
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
Anton Vorontsov authored and Greg Kroah-Hartman committed Feb 9, 2012
1 parent 9567000 commit 3534160
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/staging/android/lowmemorykiller.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3534160

Please sign in to comment.