Skip to content

Commit cca12b4

Browse files
hcahcaVasily Gorbik
authored andcommitted
s390/mm,fault: remove VM_FAULT_PFAULT
Handling of VM_FAULT_PFAULT and VM_FAULT_BADCONTEXT is nearly identical; the only difference is within do_no_context() where however the fault_type (KERNEL_FAULT vs GMAP_FAULT) makes sure that both types will be handled differently. Therefore it is possible to get rid of VM_FAULT_PFAULT and use VM_FAULT_BADCONTEXT instead. Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
1 parent f67c2da commit cca12b4

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

arch/s390/mm/fault.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
#define VM_FAULT_BADMAP ((__force vm_fault_t)0x40000000)
5454
#define VM_FAULT_BADACCESS ((__force vm_fault_t)0x20000000)
5555
#define VM_FAULT_SIGNAL ((__force vm_fault_t)0x10000000)
56-
#define VM_FAULT_PFAULT ((__force vm_fault_t)0x8000000)
5756

5857
enum fault_type {
5958
KERNEL_FAULT,
@@ -294,7 +293,6 @@ static void do_fault_error(struct pt_regs *regs, vm_fault_t fault)
294293
}
295294
fallthrough;
296295
case VM_FAULT_BADCONTEXT:
297-
case VM_FAULT_PFAULT:
298296
do_no_context(regs, fault);
299297
break;
300298
case VM_FAULT_SIGNAL:
@@ -459,7 +457,7 @@ static inline vm_fault_t do_exception(struct pt_regs *regs, int access)
459457
* mmap_lock has not been released
460458
*/
461459
current->thread.gmap_pfault = 1;
462-
fault = VM_FAULT_PFAULT;
460+
fault = VM_FAULT_BADCONTEXT;
463461
goto out_up;
464462
}
465463
flags &= ~FAULT_FLAG_RETRY_NOWAIT;

0 commit comments

Comments
 (0)