mutex: ensure that fio_mutex_up() holds mutex lock during wakeup
authorJens Axboe <axboe@kernel.dk>
Fri, 9 Mar 2018 14:55:40 +0000 (07:55 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 9 Mar 2018 14:55:40 +0000 (07:55 -0700)
commite4ccf13bad6de387704690215359978731d1015b
tree42b07f85ab2a66d5f95d434b8bad3a4840ed8614
parent582e2fd9acae207400bed4226ceda4ee02464136
mutex: ensure that fio_mutex_up() holds mutex lock during wakeup

Some implementations mandate that you hold the lock while
issuing the wakeup, as not to lose a wakeup. This seems to
be the case for Windows. See the lengthy thread on the topic
here:

https://www.spinics.net/lists/fio/msg06772.html

Thanks to Sitsofe Wheeler for heroic debugging.

Reported-by: Rebecca Cran <rebecca@bluestop.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
mutex.c