Skip to content

Commit b61a092

Browse files
hcahcaVasily Gorbik
authored andcommitted
s390/mm,fault: remove VM_FAULT_SIGNAL
Remove VM_FAULT_SIGNAL and open-code it at the only two locations where it is used. Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
1 parent 0f86ac4 commit b61a092

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

arch/s390/mm/fault.c

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
*/
5252
#define VM_FAULT_BADMAP ((__force vm_fault_t)0x40000000)
5353
#define VM_FAULT_BADACCESS ((__force vm_fault_t)0x20000000)
54-
#define VM_FAULT_SIGNAL ((__force vm_fault_t)0x10000000)
5554

5655
enum fault_type {
5756
KERNEL_FAULT,
@@ -291,10 +290,6 @@ static void do_fault_error(struct pt_regs *regs, vm_fault_t fault)
291290
}
292291
do_no_context(regs);
293292
break;
294-
case VM_FAULT_SIGNAL:
295-
if (!user_mode(regs))
296-
do_no_context(regs);
297-
break;
298293
default: /* fault & VM_FAULT_ERROR */
299294
if (fault & VM_FAULT_OOM) {
300295
if (!user_mode(regs))
@@ -393,8 +388,9 @@ static void do_exception(struct pt_regs *regs, int access)
393388
count_vm_vma_lock_event(VMA_LOCK_RETRY);
394389
/* Quick path to respond to signals */
395390
if (fault_signal_pending(fault, regs)) {
396-
fault = VM_FAULT_SIGNAL;
397-
goto out;
391+
if (!user_mode(regs))
392+
handle_fault_error_nolock(regs);
393+
return;
398394
}
399395
lock_mmap:
400396
mmap_read_lock(mm);
@@ -429,10 +425,11 @@ static void do_exception(struct pt_regs *regs, int access)
429425
goto out_up;
430426
fault = handle_mm_fault(vma, address, flags, regs);
431427
if (fault_signal_pending(fault, regs)) {
432-
fault = VM_FAULT_SIGNAL;
433428
if (flags & FAULT_FLAG_RETRY_NOWAIT)
434-
goto out_up;
435-
goto out;
429+
mmap_read_unlock(mm);
430+
if (!user_mode(regs))
431+
handle_fault_error_nolock(regs);
432+
return;
436433
}
437434
/* The fault is fully completed (including releasing mmap lock) */
438435
if (fault & VM_FAULT_COMPLETED) {

0 commit comments

Comments
 (0)