From: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
To: linux-kernel <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>, Andrew Morton <akpm@osdl.org>
Cc: Christoph Lameter <clameter@sgi.com>
Subject: [PATCH 2.6.18-rc6-mm2] fix migrate_page_move_mapping for radix tree cleanup
Date: Wed, 13 Sep 2006 18:48:27 -0400 [thread overview]
Message-ID: <1158187707.5328.86.camel@localhost> (raw)
Alternative to my "revert migrate_move_mapping ..." patch:
Change to radix_tree_{deref|replace}_slot() API requires
change to migrate_page_move_mapping() [only user of those
APIs, so far] to eliminate compiler warnings.
Apply only after backing out the patch:
page-migration-replace-radix_tree_lookup_slot-with-radix_tree_lockup.patch
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
mm/migrate.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
Index: linux-2.6.18-rc6-mm2/mm/migrate.c
===================================================================
--- linux-2.6.18-rc6-mm2.orig/mm/migrate.c 2006-09-13 22:32:44.000000000 -0400
+++ linux-2.6.18-rc6-mm2/mm/migrate.c 2006-09-13 22:38:43.000000000 -0400
@@ -294,7 +294,7 @@ out:
static int migrate_page_move_mapping(struct address_space *mapping,
struct page *newpage, struct page *page)
{
- struct page **radix_pointer;
+ void **pslot;
if (!mapping) {
/* Anonymous page */
@@ -305,12 +305,11 @@ static int migrate_page_move_mapping(str
write_lock_irq(&mapping->tree_lock);
- radix_pointer = (struct page **)radix_tree_lookup_slot(
- &mapping->page_tree,
- page_index(page));
+ pslot = radix_tree_lookup_slot(&mapping->page_tree,
+ page_index(page));
if (page_count(page) != 2 + !!PagePrivate(page) ||
- radix_tree_deref_slot(radix_pointer) != page) {
+ (struct page *)radix_tree_deref_slot(pslot) != page) {
write_unlock_irq(&mapping->tree_lock);
return -EAGAIN;
}
@@ -326,7 +325,7 @@ static int migrate_page_move_mapping(str
}
#endif
- radix_tree_replace_slot(radix_pointer, newpage);
+ radix_tree_replace_slot(pslot, newpage);
__put_page(page);
write_unlock_irq(&mapping->tree_lock);
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2006-09-13 22:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-13 22:48 Lee Schermerhorn [this message]
2006-09-13 22:53 ` Christoph Lameter
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=1158187707.5328.86.camel@localhost \
--to=lee.schermerhorn@hp.com \
--cc=akpm@osdl.org \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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