Signed-off-by: Jens Axboe <axboe@fb.com>
pthread_mutex_lock(&ipt->start_lock);
/* exit if other threads failed to initialize */
pthread_mutex_lock(&ipt->start_lock);
/* exit if other threads failed to initialize */
- if (ipc.status == IDLE_PROF_STATUS_ABORT)
+ if (ipc.status == IDLE_PROF_STATUS_ABORT) {
+ pthread_mutex_unlock(&ipt->start_lock);
/* exit if we are doing calibration only */
/* exit if we are doing calibration only */
- if (ipc.status == IDLE_PROF_STATUS_CALI_STOP)
+ if (ipc.status == IDLE_PROF_STATUS_CALI_STOP) {
+ pthread_mutex_unlock(&ipt->start_lock);
fio_gettime(&ipt->tps, NULL);
ipt->state = TD_RUNNING;
fio_gettime(&ipt->tps, NULL);
ipt->state = TD_RUNNING;