From: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 5/5] mm/page_alloc.c: Use list_for_each_entry instead of list_for_each
Date: Sun, 22 Jul 2007 20:56:08 +0200 [thread overview]
Message-ID: <20070722185608.GK27415@traven> (raw)
In-Reply-To: <20070722184202.GF27415@traven>
mm/page_alloc.c: Convert list_for_each to list_for_each_entry in
mark_free_pages()
Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
--
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 05ace44..1f138fb 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -731,7 +731,7 @@ void mark_free_pages(struct zone *zone)
unsigned long pfn, max_zone_pfn;
unsigned long flags;
int order;
- struct list_head *curr;
+ struct page *curr_page;
if (!zone->spanned_pages)
return;
@@ -748,10 +748,11 @@ void mark_free_pages(struct zone *zone)
}
for (order = MAX_ORDER - 1; order >= 0; --order)
- list_for_each(curr, &zone->free_area[order].free_list) {
+ list_for_each_entry(curr_page,
+ &zone->free_area[order].free_list, lru) {
unsigned long i;
- pfn = page_to_pfn(list_entry(curr, struct page, lru));
+ pfn = page_to_pfn(curr_page);
for (i = 0; i < (1UL << order); i++)
swsusp_set_page_free(pfn_to_page(pfn + i));
}
--
Matthias Kaehlcke
Linux Application Developer
Barcelona
La posibilidad de realizar un suenyo es lo
que hace que la vida sea interesante
.''`.
using free software / Debian GNU/Linux | http://debian.org : :' :
`. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `-
prev parent reply other threads:[~2007-07-22 18:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-22 18:42 [PATCH 0/5] Use list_for_each_entry(_safe) instead of list_for_each(_safe) Matthias Kaehlcke
2007-07-22 18:49 ` [PATCH 1/5] kernel/exit.c: " Matthias Kaehlcke
2007-07-22 18:51 ` [PATCH 2/5] kernel/time/clocksource.c: Use list_for_each_entry instead of list_for_each Matthias Kaehlcke
2007-07-22 18:52 ` [PATCH 3/5] kernel/user.c: " Matthias Kaehlcke
2007-07-22 18:54 ` [PATCH 4/5] mm/oom_kill.c: " Matthias Kaehlcke
2007-07-22 18:56 ` Matthias Kaehlcke [this message]
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=20070722185608.GK27415@traven \
--to=matthias.kaehlcke@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.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