Skip to content

Commit

Permalink
Fix undefined reference on spl_mutex_spin_max().
Browse files Browse the repository at this point in the history
Commit 3160d4f changed the set of
conditions under which spl_mutex_spin_max would be implemented as a
function by changing an #if in sys/mutex.h. The corresponding
implementation file spl-mutex.c, however, has not been updated to
reflect the change. This results in undefined reference errors on
spl_mutex_spin_max under the following condition:

((!CONFIG_SMP || CONFIG_DEBUG_MUTEXES) && HAVE_MUTEX_OWNER && HAVE_TASK_CURR)

This patch fixes the issue by using the same #if in sys/mutex.h and
spl-mutex.c.

Signed-off-by: Brian Behlendorf <[email protected]>
Issue openzfs/zfs#851
  • Loading branch information
dechamps authored and behlendorf committed Jul 26, 2012
1 parent 016432f commit 38b5ff4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/spl/spl-mutex.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
* unavailable we provide a standard mutex.
*/

#ifndef HAVE_MUTEX_OWNER
#if !defined(HAVE_MUTEX_OWNER) || !defined(CONFIG_SMP) || defined(CONFIG_DEBUG_MUTEXES)
#ifdef HAVE_TASK_CURR
/*
* mutex_spin_max = { 0, -1, 1-MAX_INT }
Expand Down

0 comments on commit 38b5ff4

Please sign in to comment.