Remove divide by zero possibility from calc_latency(). --- diff/drivers/md/dm-iostats.c 2002-12-16 16:06:12.000000000 +0000 +++ source/drivers/md/dm-iostats.c 2002-12-17 09:42:41.000000000 +0000 @@ -171,9 +171,9 @@ { unsigned long start_total = to_milli(&ic->start[rw]); unsigned long end_total = to_milli(&ic->end[rw]); + unsigned long count = atomic_read(&ic->ios[rw]); - return (end_total - start_total) / - (unsigned long) atomic_read(&ic->ios[rw]); + return count ? ((end_total - start_total) / count) : 0; } static int iostats_status(struct dm_target *ti, status_type_t type,