aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/shmem.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index 9a1b553e30e0..2b686e3f53ad 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1947,14 +1947,14 @@ static int synchronous_wake_function(wait_queue_entry_t *wait, unsigned mode, in
1947 return ret; 1947 return ret;
1948} 1948}
1949 1949
1950static int shmem_fault(struct vm_fault *vmf) 1950static vm_fault_t shmem_fault(struct vm_fault *vmf)
1951{ 1951{
1952 struct vm_area_struct *vma = vmf->vma; 1952 struct vm_area_struct *vma = vmf->vma;
1953 struct inode *inode = file_inode(vma->vm_file); 1953 struct inode *inode = file_inode(vma->vm_file);
1954 gfp_t gfp = mapping_gfp_mask(inode->i_mapping); 1954 gfp_t gfp = mapping_gfp_mask(inode->i_mapping);
1955 enum sgp_type sgp; 1955 enum sgp_type sgp;
1956 int error; 1956 int err;
1957 int ret = VM_FAULT_LOCKED; 1957 vm_fault_t ret = VM_FAULT_LOCKED;
1958 1958
1959 /* 1959 /*
1960 * Trinity finds that probing a hole which tmpfs is punching can 1960 * Trinity finds that probing a hole which tmpfs is punching can
@@ -2022,10 +2022,10 @@ static int shmem_fault(struct vm_fault *vmf)
2022 else if (vma->vm_flags & VM_HUGEPAGE) 2022 else if (vma->vm_flags & VM_HUGEPAGE)
2023 sgp = SGP_HUGE; 2023 sgp = SGP_HUGE;
2024 2024
2025 error = shmem_getpage_gfp(inode, vmf->pgoff, &vmf->page, sgp, 2025 err = shmem_getpage_gfp(inode, vmf->pgoff, &vmf->page, sgp,
2026 gfp, vma, vmf, &ret); 2026 gfp, vma, vmf, &ret);
2027 if (error) 2027 if (err)
2028 return ((error == -ENOMEM) ? VM_FAULT_OOM : VM_FAULT_SIGBUS); 2028 return vmf_error(err);
2029 return ret; 2029 return ret;
2030} 2030}
2031 2031