Tags: convert, inoom_kill_process, instead, kaehlcke, linux, list_for_each, list_for_each_entry, matthias, oom_kill, oom_killc, signed-off-by, software, unix
mm/oom_kill.c: Use list_for_each_entry instead of list_for_each
On Software » Linux & Unix
1,822 words with 0 Comments; publish: Mon, 19 May 2008 20:31:00 GMT; (40078.13, « »)
mm/oom_kill.c: Convert list_for_each to list_for_each_entry in
oom_kill_process()
Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke.linux-unix.itags.org.gmail.com>
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index a700141..b1851c4 100644
-- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
.linux-unix.itags.org..linux-unix.itags.org. -347,7 +347,6 .linux-unix.itags.org..linux-unix.itags.org. static int oom_kill_process(struct task_struct *p, unsig
ned long points,
const char *message)
{
struct task_struct *c;
- struct list_head *tsk;
/*
* If the task is already exiting, don't alarm the sysadmin or kill
.linux-unix.itags.org..linux-unix.itags.org. -362,8 +361,7 .linux-unix.itags.org..linux-unix.itags.org. static int oom_kill_process(struct task_struct *p, unsig
ned long points,
message, p->pid, p->comm, points);
/* Try to kill a child first */
- list_for_each(tsk, &p->children) {
- c = list_entry(tsk, struct task_struct, sibling);
+ list_for_each_entry(c, &p->children, sibling) {
if (c->mm == p->mm)
continue;
if (!oom_kill_task(c))
Matthias Kaehlcke
Linux Application Developer
Barcelona
Ma patrie est o je suis, o personne ne me drange, o personne
ne me demande que je suis, d'o je viens et ce que je fais
(B. Traven)
.''`.
using free software / Debian GNU/Linux | http://debian.org : :' :
`. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.linux-unix.itags.org.vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
http://linux-unix.itags.org/q_linux-unix_97345.html
All Comments
Leave a comment...
- 0 Comments