]> www.infradead.org Git - users/willy/linux.git/commitdiff
kernel/locking/mutex.c: remove caller signal_pending branch predictions
authorDavidlohr Bueso <dave@stgolabs.net>
Wed, 5 Dec 2018 00:14:25 +0000 (11:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 10 Dec 2018 08:29:18 +0000 (19:29 +1100)
This is already done for us internally by the signal machinery.

Link: http://lkml.kernel.org/r/20181116002713.8474-2-dave@stgolabs.net
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
kernel/locking/mutex.c

index 3f8a35104285ab29fe2e9992430e75b6aefbff89..db578783dd36a3efc87b2bd052ba1353438850ed 100644 (file)
@@ -987,7 +987,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
                 * wait_lock. This ensures the lock cancellation is ordered
                 * against mutex_unlock() and wake-ups do not go missing.
                 */
-               if (unlikely(signal_pending_state(state, current))) {
+               if (signal_pending_state(state, current)) {
                        ret = -EINTR;
                        goto err;
                }