On Thu, Mar 08, 2018 at 02:26:58PM -0800, Andrew Morton wrote: > On Thu, 8 Mar 2018 18:35:23 +0530 Souptick Joarder <jrdr.linux@xxxxxxxxx> wrote: > > > Use new return type vm_fault_t for fault handler > > in struct vm_operations_struct. > > I can't find vm_fault_t? Way down at the bottom, in mm_types.h. mm.h is a bit heavyweight, and we need vm_fault_t in vm_special_mapping->fault. > > vmf_insert_mixed(), vmf_insert_pfn() and vmf_insert_page() > > are newly added inline wrapper functions. > > Why? The various drivers that get converted will need them (or something similar to them). I think eventually we can convert vm_insert_foo() into vmf_insert_foo() and remove these inline wrappers, but these are a good intermediate step. > Well if we're going to do this then we should convert all the > .page_mkwrite() instances and a bunch of other stuff to use vm_fault_t. > It's a lot of work. Perhaps we should just keep using "int". We've had bugs before where drivers returned -EFOO. And we have this silly inefficiency where vm_insert_foo() return an errno which (afaict) every driver then converts into a VM_FAULT code. Souptick's willing to do the work; Michal Hocko agrees it's worth doing; I'm willing to supervise. It seems worth faciitating.