lkml.org 
[lkml]   [2012]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 5/6] staging: android/lowmemorykiller: No need for task->signal check
>  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 0755e2f..6e800d3 100644
> --- a/drivers/staging/android/lowmemorykiller.c
> +++ b/drivers/staging/android/lowmemorykiller.c
> @@ -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;

ack.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-02-06 22:41    [W:0.109 / U:5.972 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site