mutex: Fix missing conditions to build mutex_spin_on_owner()
authorFrederic Weisbecker <fweisbec@gmail.com>
Wed, 2 Dec 2009 19:49:17 +0000 (20:49 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 3 Dec 2009 10:50:11 +0000 (11:50 +0100)
We don't need to build mutex_spin_on_owner() if we have
CONFIG_DEBUG_MUTEXES or CONFIG_HAVE_DEFAULT_NO_SPIN_MUTEXES as
it won't be used under such configs.

Use CONFIG_MUTEX_SPIN_ON_OWNER as it gathers all the necessary
checks before building it.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <1259783357-8542-2-git-send-regression-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
kernel/sched.c

index 3c11ae0a948d9337732ce9d0e37076d84c324ff6..ec0af1fcb195957e2d3814541058c65a4a1ab2ba 100644 (file)
@@ -5481,7 +5481,7 @@ need_resched_nonpreemptible:
 }
 EXPORT_SYMBOL(schedule);
 
-#ifdef CONFIG_SMP
+#ifdef CONFIG_MUTEX_SPIN_ON_OWNER
 /*
  * Look out! "owner" is an entirely speculative pointer
  * access and not reliable.