diff options
-rw-r--r-- | lib/libspl/asm-generic/atomic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libspl/asm-generic/atomic.c b/lib/libspl/asm-generic/atomic.c index f03f93609..35535ea49 100644 --- a/lib/libspl/asm-generic/atomic.c +++ b/lib/libspl/asm-generic/atomic.c @@ -415,7 +415,7 @@ atomic_clear_long_excl(volatile ulong_t *target, uint_t value) VERIFY3S(pthread_mutex_lock(&atomic_lock), ==, 0); bit = (1UL << value); - if ((*target & bit) != 0) { + if ((*target & bit) == 0) { VERIFY3S(pthread_mutex_unlock(&atomic_lock), ==, 0); return (-1); } |