Re: [PATCH v2] mm: Change return type int to vm_fault_t for fault handlers

2018-06-04 Thread Matthew Wilcox
On Mon, Jun 04, 2018 at 10:07:16AM +0530, Souptick Joarder wrote: > On Sun, Jun 3, 2018 at 3:31 AM, Matthew Wilcox wrote: > > On Sun, Jun 03, 2018 at 01:34:07AM +0530, Souptick Joarder wrote: > >> @@ -3570,9 +3571,8 @@ static int hugetlb_cow(struct mm_struct *mm, struct > >> vm_area_struct *vma,

Re: [PATCH v2] mm: Change return type int to vm_fault_t for fault handlers

2018-06-03 Thread Souptick Joarder
On Sun, Jun 3, 2018 at 3:31 AM, Matthew Wilcox wrote: > On Sun, Jun 03, 2018 at 01:34:07AM +0530, Souptick Joarder wrote: >> @@ -3570,9 +3571,8 @@ static int hugetlb_cow(struct mm_struct *mm, struct >> vm_area_struct *vma, >> return 0; >> } >> >> -

Re: [PATCH v2] mm: Change return type int to vm_fault_t for fault handlers

2018-06-02 Thread Matthew Wilcox
On Sun, Jun 03, 2018 at 01:34:07AM +0530, Souptick Joarder wrote: > @@ -3570,9 +3571,8 @@ static int hugetlb_cow(struct mm_struct *mm, struct > vm_area_struct *vma, > return 0; > } > > - ret = (PTR_ERR(new_page) == -ENOMEM) ? > -

[PATCH v2] mm: Change return type int to vm_fault_t for fault handlers

2018-06-02 Thread Souptick Joarder
Use new return type vm_fault_t for fault handler. For now, this is just documenting that the function returns a VM_FAULT value rather than an errno. Once all instances are converted, vm_fault_t will become a distinct type. Ref-> commit 1c8f422059ae ("mm: change return type to vm_fault_t") The aim