about summary refs log tree commit diff
path: root/nptl/pthread_mutex_destroy.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/pthread_mutex_destroy.c')
-rw-r--r--nptl/pthread_mutex_destroy.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/nptl/pthread_mutex_destroy.c b/nptl/pthread_mutex_destroy.c
index dec390c552..91ccfb0d29 100644
--- a/nptl/pthread_mutex_destroy.c
+++ b/nptl/pthread_mutex_destroy.c
@@ -25,9 +25,7 @@ int
 __pthread_mutex_destroy (mutex)
      pthread_mutex_t *mutex;
 {
-  if (__builtin_expect (mutex->__data.__kind == PTHREAD_MUTEX_ERRORCHECK_NP,
-			0)
-      && lll_mutex_trylock (mutex->__data.__lock) != 0)
+  if (mutex->__data.__nusers != 0)
     return EBUSY;
 
   return 0;