diff options
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index 0a555af8733d..ad155c7745dc 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -1103,7 +1103,7 @@ static int shmem_getpage(struct inode *inode, unsigned long idx, | |||
1103 | return -EFBIG; | 1103 | return -EFBIG; |
1104 | 1104 | ||
1105 | if (type) | 1105 | if (type) |
1106 | *type = VM_FAULT_MINOR; | 1106 | *type = 0; |
1107 | 1107 | ||
1108 | /* | 1108 | /* |
1109 | * Normally, filepage is NULL on entry, and either found | 1109 | * Normally, filepage is NULL on entry, and either found |
@@ -1138,9 +1138,9 @@ repeat: | |||
1138 | if (!swappage) { | 1138 | if (!swappage) { |
1139 | shmem_swp_unmap(entry); | 1139 | shmem_swp_unmap(entry); |
1140 | /* here we actually do the io */ | 1140 | /* here we actually do the io */ |
1141 | if (type && *type == VM_FAULT_MINOR) { | 1141 | if (type && !(*type & VM_FAULT_MAJOR)) { |
1142 | __count_vm_event(PGMAJFAULT); | 1142 | __count_vm_event(PGMAJFAULT); |
1143 | *type = VM_FAULT_MAJOR; | 1143 | *type |= VM_FAULT_MAJOR; |
1144 | } | 1144 | } |
1145 | spin_unlock(&info->lock); | 1145 | spin_unlock(&info->lock); |
1146 | swappage = shmem_swapin(info, swap, idx); | 1146 | swappage = shmem_swapin(info, swap, idx); |
@@ -1323,7 +1323,7 @@ static int shmem_fault(struct vm_area_struct *vma, struct vm_fault *vmf) | |||
1323 | return ((error == -ENOMEM) ? VM_FAULT_OOM : VM_FAULT_SIGBUS); | 1323 | return ((error == -ENOMEM) ? VM_FAULT_OOM : VM_FAULT_SIGBUS); |
1324 | 1324 | ||
1325 | mark_page_accessed(vmf->page); | 1325 | mark_page_accessed(vmf->page); |
1326 | return ret | FAULT_RET_LOCKED; | 1326 | return ret | VM_FAULT_LOCKED; |
1327 | } | 1327 | } |
1328 | 1328 | ||
1329 | #ifdef CONFIG_NUMA | 1329 | #ifdef CONFIG_NUMA |