Staging: android: replace oomkilladj with oom_adj
PATCH 1/1 Staging: android: replace oomkilladj with oom_adj
Commit 2ff05b2b (oom: move oom_adj value from task_struct to mm_struct) changed it.
Fix build.
Signed-off-by Alexander Beregalov <[email protected]>
--- drivers/staging/android/lowmemorykiller.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/android/lowmemorykiller.c +1 -1
@@ -103,7 +103,7 @@ static int lowmem_shrink(int nr_to_scan, gfp_t gfp_mask)task_unlock (p);continue ; } - oom_adj = p->oomkilladj; + oom_adj = p->mm->oom_adj;if (oom_adj < min_adj) {task_unlock (p);continue ;
Signature · 1 line
1.6.3.1
Quoted 4 lines · Alexander Beregalov
Commit
2ff05b2b(oom: moveoom_adjvalue fromtask_structtomm_struct) changed it.
Fix build.
Andrew had already sent this fix to Greg, thanks.
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.
Cc Greg KH <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/staging/android/lowmemorykiller.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/staging/android/lowmemorykiller.c renamed from drivers/staging/android/lowmemorykiller.c~oom-move-oom_adj-value-from-task_struct-to-mm_struct-fix +5 -3
@@ -96,19 +96,21 @@ static int lowmem_shrink(int nr_to_scan,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 ;