diff options
author | David Rientjes <rientjes@google.com> | 2009-06-16 16:42:53 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-07-28 14:07:10 -0700 |
commit | a6a9f81ccc9f5c86ccc22bbed1960a57d0316e8b (patch) | |
tree | 80f5946c25e7bb4cf7d1390757a2c1fccff69866 /drivers/staging/android | |
parent | de8f8bd63334fe2014be7d9ab3a81ce9b96e5d19 (diff) | |
download | op-kernel-dev-a6a9f81ccc9f5c86ccc22bbed1960a57d0316e8b.zip op-kernel-dev-a6a9f81ccc9f5c86ccc22bbed1960a57d0316e8b.tar.gz |
Staging: android: lowmemorykiller.c: fix it for "oom: move oom_adj value from task_struct to mm_struct"
I'm about to merge "oom: move oom_adj value from task_struct to
mm_struct", and this fixup is needed to repair linux-next's
drivers/staging/android/lowmemorykiller.c.
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/android')
-rw-r--r-- | drivers/staging/android/lowmemorykiller.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c index fe72240..f934393 100644 --- a/drivers/staging/android/lowmemorykiller.c +++ b/drivers/staging/android/lowmemorykiller.c @@ -96,19 +96,21 @@ static int lowmem_shrink(int nr_to_scan, gfp_t gfp_mask) read_lock(&tasklist_lock); for_each_process(p) { + struct mm_struct *mm; int oom_adj; task_lock(p); - if (!p->mm) { + mm = p->mm; + if (!mm) { task_unlock(p); continue; } - oom_adj = p->oomkilladj; + oom_adj = mm->oom_adj; if (oom_adj < min_adj) { task_unlock(p); continue; } - tasksize = get_mm_rss(p->mm); + tasksize = get_mm_rss(mm); task_unlock(p); if (tasksize <= 0) continue; |