rate-submit: remove code that can never be executed
authorVincent Fu <vincent.fu@wdc.com>
Mon, 15 Oct 2018 14:44:47 +0000 (10:44 -0400)
committerVincent Fu <vincent.fu@wdc.com>
Mon, 15 Oct 2018 19:57:31 +0000 (15:57 -0400)
The do-while loop above can only be exited when ret != FIO_Q_BUSY. So
the if (ret == FIO_Q_BUSY) branch will never be taken.

rate-submit.c

index 8ecd285..68ad755 100644 (file)
@@ -83,10 +83,6 @@ static int io_workqueue_fn(struct submit_worker *sw,
                ret = io_u_queued_complete(td, min_evts);
                if (ret > 0)
                        td->cur_depth -= ret;
-       } else if (ret == FIO_Q_BUSY) {
-               ret = io_u_queued_complete(td, td->cur_depth);
-               if (ret > 0)
-                       td->cur_depth -= ret;
        }
 
        return 0;