]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mm/: remove caller signal_pending branch predictions
authorDavidlohr Bueso <dave@stgolabs.net>
Thu, 3 Jan 2019 23:28:55 +0000 (15:28 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 4 Jan 2019 21:13:48 +0000 (13:13 -0800)
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 <dave@stgolabs.net>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/filemap.c
mm/gup.c
mm/hugetlb.c

index 29655fb47a2c4b2cf61e1c61e5b06d6f51e537a8..9f5e323e883e6f0921bf9cdbfb81c6cf698064a4 100644 (file)
@@ -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;
                }
index 8cb68a50dbdf28a27dfaef6dce27e6cdb1f87881..6dd33e16a8063ca21c653cbdf68537ebefdd710c 100644 (file)
--- 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;
                }
index e37efd5d831830123ca117a0efec6eead901eaa7..7450888109651f8974de4c04cab9a91ef7309932 100644 (file)
@@ -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;
                }