lkml.org 
[lkml]   [2019]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm/memory.c: Convert to use vmf_error()
On Fri, Sep 06, 2019 at 12:13:00AM +0530, Souptick Joarder wrote:
> +++ b/mm/memory.c
> @@ -1750,13 +1750,10 @@ static vm_fault_t __vm_insert_mixed(struct vm_area_struct *vma,
> } else {
> return insert_pfn(vma, addr, pfn, pgprot, mkwrite);
> }
> -
> - if (err == -ENOMEM)
> - return VM_FAULT_OOM;
> - if (err < 0 && err != -EBUSY)
> - return VM_FAULT_SIGBUS;
> -
> - return VM_FAULT_NOPAGE;
> + if (!err || err == -EBUSY)
> + return VM_FAULT_NOPAGE;
> + else
> + return vmf_error(err);
> }

My plan is to convert insert_page() to return a VM_FAULT error code like
insert_pfn() does. Need to finish off the vm_insert_page() conversions
first ;-)

\
 
 \ /
  Last update: 2019-09-05 21:00    [W:0.045 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site