The patch titled Subject: mm/shmem.c: use new return type vm_fault_t has been added to the -mm tree. Its filename is mm-shmem-adding-new-return-type-vm_fault_t.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-shmem-adding-new-return-type-vm_fault_t.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-shmem-adding-new-return-type-vm_fault_t.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Souptick Joarder <jrdr.linux@xxxxxxxxx> Subject: mm/shmem.c: use new return type vm_fault_t 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-> 1c8f422059ae ("mm: change return type to vm_fault_t") vmf_error() is the newly introduce inline function in 4.17-rc6. Link: http://lkml.kernel.org/r/20180521202410.GA17912@jordon-HP-15-Notebook-PC Signed-off-by: Souptick Joarder <jrdr.linux@xxxxxxxxx> Reviewed-by: Matthew Wilcox <mawilcox@xxxxxxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/shmem.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff -puN mm/shmem.c~mm-shmem-adding-new-return-type-vm_fault_t mm/shmem.c --- a/mm/shmem.c~mm-shmem-adding-new-return-type-vm_fault_t +++ a/mm/shmem.c @@ -1947,14 +1947,14 @@ static int synchronous_wake_function(wai return ret; } -static int shmem_fault(struct vm_fault *vmf) +static vm_fault_t shmem_fault(struct vm_fault *vmf) { struct vm_area_struct *vma = vmf->vma; struct inode *inode = file_inode(vma->vm_file); gfp_t gfp = mapping_gfp_mask(inode->i_mapping); enum sgp_type sgp; - int error; - int ret = VM_FAULT_LOCKED; + int err; + vm_fault_t ret = VM_FAULT_LOCKED; /* * Trinity finds that probing a hole which tmpfs is punching can @@ -2022,10 +2022,10 @@ static int shmem_fault(struct vm_fault * else if (vma->vm_flags & VM_HUGEPAGE) sgp = SGP_HUGE; - error = shmem_getpage_gfp(inode, vmf->pgoff, &vmf->page, sgp, + err = shmem_getpage_gfp(inode, vmf->pgoff, &vmf->page, sgp, gfp, vma, vmf, &ret); - if (error) - return ((error == -ENOMEM) ? VM_FAULT_OOM : VM_FAULT_SIGBUS); + if (err) + return vmf_error(err); return ret; } _ Patches currently in -mm which might be from jrdr.linux@xxxxxxxxx are fs-dax-adding-new-return-type-vm_fault_t.patch mm-adding-new-return-type-vm_fault_t.patch mm-change-return-type-to-vm_fault_t.patch mm-shmem-adding-new-return-type-vm_fault_t.patch kernel-relay-change-return-type-to-vm_fault_t.patch ipc-adding-new-return-type-vm_fault_t.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html