aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/migrate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index 1a531b760b3b..89a6bc8cd307 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -248,7 +248,7 @@ static int migrate_page_move_mapping(struct address_space *mapping,
248 248
249 expected_count = 2 + page_has_private(page); 249 expected_count = 2 + page_has_private(page);
250 if (page_count(page) != expected_count || 250 if (page_count(page) != expected_count ||
251 (struct page *)radix_tree_deref_slot(pslot) != page) { 251 radix_tree_deref_slot_protected(pslot, &mapping->tree_lock) != page) {
252 spin_unlock_irq(&mapping->tree_lock); 252 spin_unlock_irq(&mapping->tree_lock);
253 return -EAGAIN; 253 return -EAGAIN;
254 } 254 }
@@ -320,7 +320,7 @@ int migrate_huge_page_move_mapping(struct address_space *mapping,
320 320
321 expected_count = 2 + page_has_private(page); 321 expected_count = 2 + page_has_private(page);
322 if (page_count(page) != expected_count || 322 if (page_count(page) != expected_count ||
323 (struct page *)radix_tree_deref_slot(pslot) != page) { 323 radix_tree_deref_slot_protected(pslot, &mapping->tree_lock) != page) {
324 spin_unlock_irq(&mapping->tree_lock); 324 spin_unlock_irq(&mapping->tree_lock);
325 return -EAGAIN; 325 return -EAGAIN;
326 } 326 }