mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] android: fix build error
@ 2009-09-10  6:30 KOSAKI Motohiro
  2009-09-10  6:31 ` [PATCH 1/2][resend][for 2.6.31 stable tree] Revert "Staging: android: lowmemorykiller.c: fix it for "oom: move oom_adj value from task_struct to mm_struct"" KOSAKI Motohiro
  2009-09-10  6:32 ` [PATCH 2/2] lowmemorykiller: fix build error to move oom_adj KOSAKI Motohiro
  0 siblings, 2 replies; 3+ messages in thread
From: KOSAKI Motohiro @ 2009-09-10  6:30 UTC (permalink / raw)
  To: LKML, Andrew Morton, stable; +Cc: kosaki.motohiro

commit 0753ba01 (mm: revert "oom: move oom_adj value") reverted some
regression patch. but it didn't revert one oom retrieved driver patch
(it is android lowoomkiller in staging tree).

This patch series fixes it.
	patch [1/2] is for 2.6.31 stable tree
	patch [2/2] is for -mm tree

-mm tree need both [1/2] and [2/2].

Thanks.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2][resend][for 2.6.31 stable tree] Revert "Staging: android: lowmemorykiller.c: fix it for "oom: move oom_adj value from task_struct to mm_struct""
  2009-09-10  6:30 [PATCH 0/2] android: fix build error KOSAKI Motohiro
@ 2009-09-10  6:31 ` KOSAKI Motohiro
  2009-09-10  6:32 ` [PATCH 2/2] lowmemorykiller: fix build error to move oom_adj KOSAKI Motohiro
  1 sibling, 0 replies; 3+ messages in thread
From: KOSAKI Motohiro @ 2009-09-10  6:31 UTC (permalink / raw)
  To: LKML; +Cc: kosaki.motohiro, Andrew Morton, stable

commit 0753ba01 (mm: revert "oom: move oom_adj value") reverted some
regression patch. but it didn't revert one oom retrieved driver patch.

Then, it made build error to the driver. This reverts commit
a6a9f81ccc9f5c86ccc22bbed1960a57d0316e8b too and fixes the build error.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
---
 drivers/staging/android/lowmemorykiller.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c
index 935d281..f91ed1c 100644
--- a/drivers/staging/android/lowmemorykiller.c
+++ b/drivers/staging/android/lowmemorykiller.c
@@ -99,21 +99,19 @@ 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);
-		mm = p->mm;
-		if (!mm) {
+		if (!p->mm) {
 			task_unlock(p);
 			continue;
 		}
-		oom_adj = mm->oom_adj;
+		oom_adj = p->oomkilladj;
 		if (oom_adj < min_adj) {
 			task_unlock(p);
 			continue;
 		}
-		tasksize = get_mm_rss(mm);
+		tasksize = get_mm_rss(p->mm);
 		task_unlock(p);
 		if (tasksize <= 0)
 			continue;
-- 
1.6.2.5




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] lowmemorykiller: fix build error to move oom_adj
  2009-09-10  6:30 [PATCH 0/2] android: fix build error KOSAKI Motohiro
  2009-09-10  6:31 ` [PATCH 1/2][resend][for 2.6.31 stable tree] Revert "Staging: android: lowmemorykiller.c: fix it for "oom: move oom_adj value from task_struct to mm_struct"" KOSAKI Motohiro
@ 2009-09-10  6:32 ` KOSAKI Motohiro
  1 sibling, 0 replies; 3+ messages in thread
From: KOSAKI Motohiro @ 2009-09-10  6:32 UTC (permalink / raw)
  To: Andrew Morton; +Cc: kosaki.motohiro, LKML, stable


Recently, oom_adj moved from task_struct to signal_struct. Then, the oom_adj
treating code in android driver also should be changed.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
---
 drivers/staging/android/lowmemorykiller.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c
index f91ed1c..63ef837 100644
--- a/drivers/staging/android/lowmemorykiller.c
+++ b/drivers/staging/android/lowmemorykiller.c
@@ -106,7 +106,7 @@ static int lowmem_shrink(int nr_to_scan, gfp_t gfp_mask)
 			task_unlock(p);
 			continue;
 		}
-		oom_adj = p->oomkilladj;
+		oom_adj = p->signal->oom_adj;
 		if (oom_adj < min_adj) {
 			task_unlock(p);
 			continue;
-- 
1.6.2.5




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-09-10  6:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-10  6:30 [PATCH 0/2] android: fix build error KOSAKI Motohiro
2009-09-10  6:31 ` [PATCH 1/2][resend][for 2.6.31 stable tree] Revert "Staging: android: lowmemorykiller.c: fix it for "oom: move oom_adj value from task_struct to mm_struct"" KOSAKI Motohiro
2009-09-10  6:32 ` [PATCH 2/2] lowmemorykiller: fix build error to move oom_adj KOSAKI Motohiro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®