Skip to content

Commit

Permalink
mutex: Fix missing conditions to build mutex_spin_on_owner()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Dec 3, 2009
1 parent c022602 commit c08f782
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -5481,7 +5481,7 @@ asmlinkage void __sched schedule(void)
}
EXPORT_SYMBOL(schedule);

#ifdef CONFIG_SMP
#ifdef CONFIG_MUTEX_SPIN_ON_OWNER
/*
* Look out! "owner" is an entirely speculative pointer
* access and not reliable.
Expand Down

0 comments on commit c08f782

Please sign in to comment.