mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: kosaki.motohiro@jp.fujitsu.com,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	David Rientjes <rientjes@google.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Linux 2.6.31-rc7
Date: Wed, 26 Aug 2009 14:06:50 +0900 (JST)	[thread overview]
Message-ID: <20090826133307.394B.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <10f740e80908230356j4622a042nb83da4952f940b2@mail.gmail.com>

> On Sat, Aug 22, 2009 at 03:26, Linus
> Torvalds<torvalds@linux-foundation.org> wrote:
> > KOSAKI Motohiro (1):
> >      mm: revert "oom: move oom_adj value"
> 
> drivers/staging/android/lowmemorykiller.c: In function 'lowmem_shrink':
> drivers/staging/android/lowmemorykiller.c:108: error: 'struct
> mm_struct' has no member named 'oom_adj'
> 
> I guess this one must be reverted as well?
> 
> commit a6a9f81ccc9f5c86ccc22bbed1960a57d0316e8b
> Author: David Rientjes <rientjes@google.com>
> Date:   Tue Jun 16 16:42:53 2009 -0700
> 
>     Staging: android: lowmemorykiller.c: fix it for "oom: move oom_adj value fro
> 
>     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.
> 

Thank you for very kindly bug report.
Unfortunatelly I didn't notice this ugly crap driver.

Yes, you are right. it should be reverted too.


Linus, can you please consider to apply following revert patch?

============================================
Subject: [PATCH] Revert android: lowmemorykiller.c: fix it for "oom: move oom_adj value from task_struct to mm_struct"

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

Then, it made build error on this android 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 f934393..fe72240 100644
--- a/drivers/staging/android/lowmemorykiller.c
+++ b/drivers/staging/android/lowmemorykiller.c
@@ -96,21 +96,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







  reply	other threads:[~2009-08-26  5:06 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-22  1:26 Linus Torvalds
2009-08-22  3:09 ` Regression: Linux 2.6.31-rc7 lost sensors on asus mobo Gene Heskett
2009-08-22  3:47   ` Linus Torvalds
2009-08-22 12:56     ` Gene Heskett
2009-08-22  6:12   ` Robert Hancock
2009-08-22 10:54     ` Stefan Richter
2009-08-22 13:48       ` Gene Heskett
2009-08-22 14:38         ` Stefan Richter
2009-08-22 19:55           ` Gene Heskett
2009-08-22 13:40     ` Gene Heskett
2009-08-23 10:56 ` Linux 2.6.31-rc7 Geert Uytterhoeven
2009-08-26  5:06   ` KOSAKI Motohiro [this message]
2009-08-25 17:25 ` mailing54
2009-08-25 18:11   ` Linus Torvalds
2009-08-25 21:37     ` mailing54
2009-08-25 22:07       ` Linus Torvalds
     [not found]         ` <1251239637.26348.20.camel@gaiman.anholt.net>
2009-08-26  1:51           ` Zhenyu Wang
2009-08-26  3:33             ` Linus Torvalds
2009-08-26  3:47               ` Dave Airlie
2009-08-26  4:13                 ` Linus Torvalds
2009-08-26  4:58                   ` Dave Airlie
2009-08-26 17:12                     ` Linus Torvalds
2009-08-26 17:18                       ` Jesse Barnes
2009-08-26  6:26                 ` Eric Anholt
2009-08-26  6:35                   ` Dave Airlie
2009-08-26  3:58               ` Zhenyu Wang
2009-08-26  4:20                 ` Linus Torvalds
2009-09-10  5:47                   ` Zhenyu Wang
2009-08-26 10:09                 ` ykzhao
2009-08-30 22:01         ` Tino Keitel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090826133307.394B.A69D9226@jp.fujitsu.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rientjes@google.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome