Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6a9f81c authored by David Rientjes's avatar David Rientjes Committed by Greg Kroah-Hartman
Browse files

Staging: android: lowmemorykiller.c: fix it for "oom: move oom_adj value from...


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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent de8f8bd6
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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;