From: Jens Axboe Date: Tue, 8 Dec 2015 19:43:40 +0000 (-0700) Subject: iolog: cleanup data wait X-Git-Tag: fio-2.2.13~19 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=7718121b8b06439f30f78cfb36b5a8d78dcb077f;p=fio.git iolog: cleanup data wait Signed-off-by: Jens Axboe --- diff --git a/iolog.c b/iolog.c index 9c59acd8..0d4d26a5 100644 --- a/iolog.c +++ b/iolog.c @@ -1163,14 +1163,13 @@ int iolog_flush(struct io_log *log, int wait) data->nr_samples = log->nr_samples; log->nr_samples = 0; - if (wait) { + data->wait = wait; + if (data->wait) { pthread_mutex_init(&data->lock, NULL); pthread_cond_init(&data->cv, NULL); data->done = 0; - data->wait = 1; data->refs = 2; - } else - data->wait = 0; + } workqueue_enqueue(&log->td->log_compress_wq, &data->work);