Re: [PATCH v6] fs: dax: Adding new return type vm_fault_t
From: Souptick Joarder
Date: Fri Apr 27 2018 - 01:25:00 EST
> I noticed that we have the following status translation now in 4 places in 2
> if (err == -ENOMEM)
> return VM_FAULT_OOM;
> if (err < 0 && err != -EBUSY)
> return VM_FAULT_SIGBUS;
> return VM_FAULT_NOPAGE;
> This happens in vmf_insert_mixed_mkwrite(), vmf_insert_page(),
> vmf_insert_mixed() and vmf_insert_pfn().
> I think it'd be a good idea to consolidate this translation into an inline
> helper, in the spirit of dax_fault_return(). This will ensure that if/when we
> start changing this status translation, we won't accidentally miss some of the
> places which would make them get out of sync. No need to fold this into this
> patch - it should be a separate change.
Sure, I will send this as a separate patch.