helper_thread: remove impossible branch
authorVincent Fu <Vincent.Fu@sandisk.com>
Thu, 16 Jun 2016 18:31:52 +0000 (14:31 -0400)
committerJens Axboe <axboe@fb.com>
Tue, 28 Jun 2016 20:03:12 +0000 (14:03 -0600)
I believe that the intention is to call update_io_ticks every
DISK_UTIL_MSEC. Make helper_thread_main do this.

Signed-off-by: Jens Axboe <axboe@fb.com>
helper_thread.c

index e788af5ba5d91e0fe203144c2e8f2f3765b86850..f031df4de508855120d41268dd32f6f05049a508 100644 (file)
@@ -110,12 +110,8 @@ static void *helper_thread_main(void *data)
                        msec_to_next_event = DISK_UTIL_MSEC;
                        if (since_du >= DISK_UTIL_MSEC)
                                msec_to_next_event -= (since_du - DISK_UTIL_MSEC);
                        msec_to_next_event = DISK_UTIL_MSEC;
                        if (since_du >= DISK_UTIL_MSEC)
                                msec_to_next_event -= (since_du - DISK_UTIL_MSEC);
-               } else {
-                       if (since_du >= DISK_UTIL_MSEC)
-                               msec_to_next_event = DISK_UTIL_MSEC - (DISK_UTIL_MSEC - since_du);
-                       else
-                               msec_to_next_event = DISK_UTIL_MSEC;
-               }
+               } else
+                       msec_to_next_event = DISK_UTIL_MSEC - since_du;
 
                if (hd->do_stat) {
                        hd->do_stat = 0;
 
                if (hd->do_stat) {
                        hd->do_stat = 0;