diff options
author | Etienne Dechamps <[email protected]> | 2012-07-16 16:33:40 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-07-26 14:54:53 -0700 |
commit | 38b5ff4d07146ad2359018c3f4707125d38c421f (patch) | |
tree | b55297f5f203de8d064e66cde5ae43db0772ef1b | |
parent | 016432fbeb625f3588039017c682f5df260c86d4 (diff) |
Fix undefined reference on spl_mutex_spin_max().
Commit 3160d4f56bf35492e9c400094f8c1ff2066d4459 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 zfsonlinux/zfs#851
-rw-r--r-- | module/spl/spl-mutex.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/spl/spl-mutex.c b/module/spl/spl-mutex.c index 983245dc0..d452681b1 100644 --- a/module/spl/spl-mutex.c +++ b/module/spl/spl-mutex.c @@ -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 } |