From: Davidlohr Bueso Date: Wed, 5 Dec 2018 00:14:26 +0000 (+1100) Subject: mm/: remove caller signal_pending branch predictions X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f111935198976857a9c77170ae283fd21a587bea;p=users%2Fwilly%2Flinux.git mm/: remove caller signal_pending branch predictions This is already done for us internally by the signal machinery. Link: http://lkml.kernel.org/r/20181116002713.8474-5-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Stephen Rothwell --- diff --git a/mm/filemap.c b/mm/filemap.c index d2df272152f5..b1165a311a1f 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -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; } diff --git a/mm/gup.c b/mm/gup.c index 8cb68a50dbdf..6dd33e16a806 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -727,7 +727,7 @@ retry: * 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; } diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 252e81e1f86e..1ac3533e8a95 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -4244,7 +4244,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; }