Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7b1915a989ea4d426d0fd98974ab80f30ef1d779
Commit:     7b1915a989ea4d426d0fd98974ab80f30ef1d779
Parent:     2e1975868ac9d41211fcaa6f2c5e44c4e7ff9e5b
Author:     Matthias Kaehlcke <[EMAIL PROTECTED]>
AuthorDate: Thu Oct 18 23:39:58 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Oct 19 11:53:38 2007 -0700

    mm/oom_kill.c: Use list_for_each_entry instead of list_for_each
    
    mm/oom_kill.c: Convert list_for_each to list_for_each_entry in
    oom_kill_process()
    
    Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]>
    Cc: Nick Piggin <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 mm/oom_kill.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index b1c2d0f..a7cb4c4 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -337,7 +337,6 @@ static int oom_kill_process(struct task_struct *p, gfp_t 
gfp_mask, int order,
                            unsigned long points, const char *message)
 {
        struct task_struct *c;
-       struct list_head *tsk;
 
        if (printk_ratelimit()) {
                printk(KERN_WARNING "%s invoked oom-killer: "
@@ -360,8 +359,7 @@ static int oom_kill_process(struct task_struct *p, gfp_t 
gfp_mask, int order,
                                        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))
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to