Mel, I don't like this fix. Consider following,
1. try_to_unmap(oldpage)
2. copy and replace
3. remove_migration_ptes(oldpage, newpage)
What this patch handles is "3: remove_migration_ptes fails to remap it and
migration_pte will remain there case....The fact "new page is not mapped" means
"get_page() is not called against the new page".
So, the new page have been able to be freed until we restart move_ptes.
I bet calling __get_user_pages_fast() before vma_adjust() is the way to go.
When page_count(page) != page_mapcount(page) +1, migration skip it.
Thanks,
-Kame
--