Without some type of mutex, td->io_ps cannot be dereferenced safely in
reap_threads().
Signed-off-by: Justin Eno <jeno@micron.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
for_each_td(td, i) {
int flags = 0;
for_each_td(td, i) {
int flags = 0;
- /*
- * ->io_ops is NULL for a thread that has closed its
- * io engine
- */
- if (td->io_ops && !strcmp(td->io_ops->name, "cpuio"))
+ if (!strcmp(td->o.ioengine, "cpuio"))
cputhreads++;
else
realthreads++;
cputhreads++;
else
realthreads++;