Skip to content

Commit

Permalink
mm/: remove caller signal_pending branch predictions
Browse files Browse the repository at this point in the history
This is already done for us internally by the signal machinery.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Davidlohr Bueso <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Davidlohr Bueso authored and torvalds committed Jan 4, 2019
1 parent d8d7d84 commit fa45f11
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ static inline int wait_on_page_bit_common(wait_queue_head_t *q,
break;
}

if (unlikely(signal_pending_state(state, current))) {
if (signal_pending_state(state, current)) {
ret = -EINTR;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion mm/gup.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ static long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
* If we have a pending SIGKILL, don't keep faulting pages and
* potentially allocating memory.
*/
if (unlikely(fatal_signal_pending(current))) {
if (fatal_signal_pending(current)) {
ret = -ERESTARTSYS;
goto out;
}
Expand Down
2 changes: 1 addition & 1 deletion mm/hugetlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -4231,7 +4231,7 @@ long follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma,
* If we have a pending SIGKILL, don't keep faulting pages and
* potentially allocating memory.
*/
if (unlikely(fatal_signal_pending(current))) {
if (fatal_signal_pending(current)) {
remainder = 0;
break;
}
Expand Down

0 comments on commit fa45f11

Please sign in to comment.