summaryrefslogtreecommitdiff
path: root/fs/dax.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/dax.c')
-rw-r--r--fs/dax.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/dax.c b/fs/dax.c
index d778e5f1a01c..74838c43be91 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -568,7 +568,11 @@ int __dax_pmd_fault(struct vm_area_struct *vma, unsigned long address,
if ((pgoff | PG_PMD_COLOUR) >= size)
goto fallback;
- if (is_huge_zero_pmd(*pmd))
+ /*
+ * If we allocated new storage, make sure no process has any
+ * zero pages covering this hole
+ */
+ if (buffer_new(&bh))
unmap_mapping_range(mapping, pgoff << PAGE_SHIFT, PMD_SIZE, 0);
if (!write && !buffer_mapped(&bh) && buffer_uptodate(&bh)) {