Bug in kernel platform trylock definition.
Unlike other kernel functions, mutex_trylock returns 1 on sucess and 0 on error. The double negations were inverting the interpretation of the result. (It still worked because on the first attempt, we interpreted as a failure and tried again; on the second attempt, it was really a failure to take the lock but we interpreted as a success.)
Showing with 1 addition and 1 deletion