Fix race in exit of eta/util thread
authorJens Axboe <jaxboe@fusionio.com>
Fri, 14 Jan 2011 14:22:14 +0000 (15:22 +0100)
committerJens Axboe <jaxboe@fusionio.com>
Fri, 14 Jan 2011 14:22:14 +0000 (15:22 +0100)
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
fio.c

diff --git a/fio.c b/fio.c
index 77451db2c37deb4e1c80db8dfa5b8d020e746ae0..9d9027d792e4ccbb8cd4f6469b89b88ed210b6e0 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -135,6 +135,8 @@ static void *disk_thread_main(void *data)
 
        while (threads) {
                usleep(DISK_UTIL_MSEC * 1000);
+               if (!threads)
+                       break;
                update_io_ticks();
                print_thread_status();
        }