]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sparc64: DAX request for non 4MB memory should return with unique errno
authorSanath Kumar <sanath.s.kumar@oracle.com>
Mon, 10 Apr 2017 21:52:32 +0000 (16:52 -0500)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 24 Apr 2017 04:43:29 +0000 (21:43 -0700)
Orabug:25852910

With this change libdax can detect that mmap failed due to lack of flow
control in DAX HW and it can proceed with dax_subpage allocation.

Reviewed-by: Rob Gardner <rob.gardner@oracle.com>
Signed-off-by: Sanath Kumar <sanath.s.kumar@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
arch/sparc/dax/dax_mm.c

index 510672d85539bac7fb9019ca044350b091b8c7a3..031767e9bda9666ff303a535d3b01a90c5f709a2 100644 (file)
@@ -44,6 +44,7 @@ static int dax_alloc_ram(struct file *filp, struct vm_area_struct *vma)
        if (dax_no_flow_ctl && len != DAX_SYN_LARGE_PAGE_SIZE) {
                dax_map_dbg("unsupported length 0x%lx != 0x%lx virtual page size",
                            len, DAX_SYN_LARGE_PAGE_SIZE);
+               ret = -EOVERFLOW;
                goto done;
        }