From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932237Ab3KWA6A (ORCPT ); Fri, 22 Nov 2013 19:58:00 -0500 Received: from g4t0014.houston.hp.com ([15.201.24.17]:5411 "EHLO g4t0014.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932081Ab3KWA4t (ORCPT ); Fri, 22 Nov 2013 19:56:49 -0500 From: Davidlohr Bueso To: linux-kernel@vger.kernel.org Cc: mingo@kernel.org, dvhart@linux.intel.com, peterz@infradead.org, tglx@linutronix.de, efault@gmx.de, jeffm@suse.com, torvalds@linux-foundation.org, scott.norton@hp.com, tom.vaden@hp.com, aswin@hp.com, Waiman.Long@hp.com, jason.low2@hp.com, davidlohr@hp.com Subject: [PATCH 2/5] futex: Check for pi futex_q only once Date: Fri, 22 Nov 2013 16:56:34 -0800 Message-Id: <1385168197-8612-3-git-send-email-davidlohr@hp.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1385168197-8612-1-git-send-email-davidlohr@hp.com> References: <1385168197-8612-1-git-send-email-davidlohr@hp.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All wake_futex() callers already verify that the we are not dealing with a pi futex_q, so we can remove the redundant WARN() check, as this is never triggered anyway. Cc: Ingo Molnar Cc: Darren Hart Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Mike Galbraith Cc: Jeff Mahoney Cc: Linus Torvalds Cc: Scott Norton Cc: Tom Vaden Cc: Aswin Chandramouleeswaran Cc: Waiman Long Cc: Jason Low Signed-off-by: Davidlohr Bueso --- kernel/futex.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/kernel/futex.c b/kernel/futex.c index e6ffe73..0768c68 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -844,9 +844,6 @@ static void wake_futex(struct futex_q *q) { struct task_struct *p = q->task; - if (WARN(q->pi_state || q->rt_waiter, "refusing to wake PI futex\n")) - return; - /* * We set q->lock_ptr = NULL _before_ we wake up the task. If * a non-futex wake up happens on another CPU then the task -- 1.8.1.4