aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@engr.sgi.com>2006-01-08 04:01:02 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-08 23:12:44 -0500
commit132beacf9785d2e6e8aecb59aa078f3ca5668fa6 (patch)
tree7b1274279448e4fde20489b7572455ef93bc4c3d /mm
parent1a75a6c825c17249ca49f050a872a04ce0997ce3 (diff)
[PATCH] Drop page table lock before calling migrate_page_add()
migrate_page_add cannot be called with a spinlock held (calls isolate_lru_page which calles schedule_on_each_cpu). Drop ptl lock in check_pte_range before calling migrate_page_add(). Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/mempolicy.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 44b9d69900b..4c0510e9e7f 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -259,8 +259,11 @@ static int check_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
259 259
260 if (flags & MPOL_MF_STATS) 260 if (flags & MPOL_MF_STATS)
261 gather_stats(page, private); 261 gather_stats(page, private);
262 else if (flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL)) 262 else if (flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL)) {
263 spin_unlock(ptl);
263 migrate_page_add(vma, page, private, flags); 264 migrate_page_add(vma, page, private, flags);
265 spin_lock(ptl);
266 }
264 else 267 else
265 break; 268 break;
266 } while (pte++, addr += PAGE_SIZE, addr != end); 269 } while (pte++, addr += PAGE_SIZE, addr != end);