diff options
-rw-r--r-- | libglusterfs/src/syncop.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c index c820be8e151..63b9973a2d1 100644 --- a/libglusterfs/src/syncop.c +++ b/libglusterfs/src/syncop.c @@ -893,7 +893,7 @@ __synclock_lock (struct synclock *lock) } break; case LOCK_THREAD: - if (pthread_self () == lock->owner_tid) { + if (pthread_equal(pthread_self (), lock->owner_tid)) { lock->lock++; gf_msg_trace ("", 0, "Recursive lock called by" " thread ,owner=%u lock=%d", @@ -1012,7 +1012,7 @@ __synclock_unlock (synclock_t *lock) break; case LOCK_THREAD: - if (pthread_self () == lock->owner_tid) { + if (pthread_equal(pthread_self (), lock->owner_tid)) { lock->lock--; gf_msg_trace ("", 0, "Unlock success %u, remaining " "locks=%d", |