wfraser/backfs — pull request #4 by ninoles (2014-12-30 23:32:40+00:00)
Title: Fix a bug with recursive mutex.

The error was a bit weird, since the original code doesn't validate the lock.
The buggy behavior was, at some point, the pthread_mutex_lock simply stall, leading to a dead_lock.

Correctly locking the mutex only once when necessary, matching the number of unlock, just fix that.