Prev: amd iommu: force flush of iommu prior during shutdown
Next: endless sync on bdi_sched_wait()? 2.6.33.1
From: Srikar Dronamraju on 31 Mar 2010 12:00 Enhance replace_page() to support pagecache Currently replace_page would work only for anonymous pages. This patch enhances replace_page() to work for pagecache pages This enhancement is useful for user_bkpt's replace_page based background page replacement for insertion and removal of breakpoints. Signed-off-by: Srikar Dronamraju <srikar(a)linux.vnet.ibm.com> Signed-off-by: Ananth N Mavinakayanahalli <ananth(a)in.ibm.com> --- mm/memory.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index 66a3632..5acf686 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2617,7 +2617,10 @@ int replace_page(struct vm_area_struct *vma, struct page *page, } get_page(kpage); - page_add_anon_rmap(kpage, vma, addr); + if (PageAnon(kpage)) + page_add_anon_rmap(kpage, vma, addr); + else + page_add_file_rmap(kpage); flush_cache_page(vma, addr, pte_pfn(*ptep)); ptep_clear_flush(vma, addr, ptep); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |