aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-08-11 18:38:45 -0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2010-10-14 13:17:23 -0400
commit2265769531afe267f864111c103b04b4427720b6 (patch)
treeda90c3ce2cb64b75288b7e2da600d3f9b9b5d5c4 /drivers/block
parentca0e6098aad127a555ba29d12e0503dbb1577aac (diff)
drbd: cleanup: change "<= 0" to "== 0"
dt is unsigned so it's never less than zero. We are calculating the elapsed time, and that's never less than zero (unless there is a bug or we invent time travel). The comparison here is just to guard against divide by zero bugs. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/drbd/drbd_proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_proc.c b/drivers/block/drbd/drbd_proc.c
index aec8426c1bf6..ad325c5d0ce1 100644
--- a/drivers/block/drbd/drbd_proc.c
+++ b/drivers/block/drbd/drbd_proc.c
@@ -118,7 +118,7 @@ static void drbd_syncer_progress(struct drbd_conf *mdev, struct seq_file *seq)
118 /* mean speed since syncer started 118 /* mean speed since syncer started
119 * we do account for PausedSync periods */ 119 * we do account for PausedSync periods */
120 dt = (jiffies - mdev->rs_start - mdev->rs_paused) / HZ; 120 dt = (jiffies - mdev->rs_start - mdev->rs_paused) / HZ;
121 if (dt <= 0) 121 if (dt == 0)
122 dt = 1; 122 dt = 1;
123 db = mdev->rs_total - rs_left; 123 db = mdev->rs_total - rs_left;
124 dbdt = Bit2KB(db/dt); 124 dbdt = Bit2KB(db/dt);