* [PATCH 2.6.18-rc6-mm2] fix migrate_page_move_mapping for radix tree cleanup
@ 2006-09-13 22:48 Lee Schermerhorn
2006-09-13 22:53 ` Christoph Lameter
0 siblings, 1 reply; 2+ messages in thread
From: Lee Schermerhorn @ 2006-09-13 22:48 UTC (permalink / raw)
To: linux-kernel, linux-mm, Andrew Morton; +Cc: Christoph Lameter
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-09-13 22:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-13 22:48 [PATCH 2.6.18-rc6-mm2] fix migrate_page_move_mapping for radix tree cleanup Lee Schermerhorn
2006-09-13 22:53 ` Christoph Lameter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox