[PATCH 2/4] dax: Call delete_from_page_cache() after unmap_mapping_range()
From: Matthew Wilcox
Date: Fri Jul 25 2014 - 09:44:32 EST
delete_from_page_cache() checks that the page is already unmapped
from everywhere, so we should unmap it from everywhere before we
delete it. This matches the call sequence in mm/truncate.c.
---
fs/dax.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/dax.c b/fs/dax.c
index a65a0f9..b4fdfd9 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -383,9 +383,9 @@ static int do_dax_fault(struct vm_area_struct *vma, struct vm_fault *vmf,
}
if (page) {
- delete_from_page_cache(page);
unmap_mapping_range(mapping, vmf->pgoff << PAGE_SHIFT,
PAGE_CACHE_SIZE, 0);
+ delete_from_page_cache(page);
unlock_page(page);
page_cache_release(page);
}
--
2.0.1
--NU0Ex4SbNnrxsi6C
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="0003-Factor-zap_pte-out-of-zap_pte_range.patch"