Skip to content
Commit 4e4ced93 authored by Vivek Goyal's avatar Vivek Goyal Committed by Dan Williams
Browse files

dax: Move mandatory ->zero_page_range() check in alloc_dax()



zero_page_range() dax operation is mandatory for dax devices. Right now
that check happens in dax_zero_page_range() function. Dan thinks that's
too late and its better to do the check earlier in alloc_dax().

I also modified alloc_dax() to return pointer with error code in it in
case of failure. Right now it returns NULL and caller assumes failure
happened due to -ENOMEM. But with this ->zero_page_range() check, I
need to return -EINVAL instead.

Signed-off-by: default avatarVivek Goyal <vgoyal@redhat.com>
Link: https://lore.kernel.org/r/20200401161125.GB9398@redhat.com


Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 4f3b4f16
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment