From: Dan Williams Date: Wed, 24 Feb 2016 22:02:06 +0000 (-0800) Subject: dax: fallback from pmd to pte on error X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8b3db9798c689ba2dc509f6ca1a8c7e1c1a3e62a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git dax: fallback from pmd to pte on error In preparation for consulting a badblocks list in pmem_direct_access(), teach dax_pmd_fault() to fallback rather than fail immediately upon encountering an error. The thought being that reducing the span of the dax request may avoid the error region. Reviewed-by: Jeff Moyer Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Dan Williams Signed-off-by: Vishal Verma --- diff --git a/fs/dax.c b/fs/dax.c index 9bc6624251b4..d602410d8e52 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -855,8 +855,8 @@ int __dax_pmd_fault(struct vm_area_struct *vma, unsigned long address, long length = dax_map_atomic(bdev, &dax); if (length < 0) { - result = VM_FAULT_SIGBUS; - goto out; + dax_pmd_dbg(&bh, address, "dax-error fallback"); + goto fallback; } if (length < PMD_SIZE) { dax_pmd_dbg(&bh, address, "dax-length too small");