diff options
author | Nicholas Mc Guire <hofrat@osadl.org> | 2015-03-17 07:47:58 -0400 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2015-04-15 12:10:21 -0400 |
commit | aca607ba242dde316794c0b607048fd5b688a520 (patch) | |
tree | c5b9934694c8e3240d1f220f528e2ab166e838ce /drivers/md | |
parent | 18cc980ac8cf8c727d1f7d581b4576ed64bd78a6 (diff) | |
download | linux-aca607ba242dde316794c0b607048fd5b688a520.tar.bz2 |
dm delay: use msecs_to_jiffies for time conversion
Converting milliseconds to jiffies by "val * HZ / 1000" is technically
OK but msecs_to_jiffies(val) is the cleaner solution and handles all
corner cases correctly.
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-delay.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-delay.c b/drivers/md/dm-delay.c index 42c3a27a14cc..57b6a1901c91 100644 --- a/drivers/md/dm-delay.c +++ b/drivers/md/dm-delay.c @@ -236,7 +236,7 @@ static int delay_bio(struct delay_c *dc, int delay, struct bio *bio) delayed = dm_per_bio_data(bio, sizeof(struct dm_delay_info)); delayed->context = dc; - delayed->expires = expires = jiffies + (delay * HZ / 1000); + delayed->expires = expires = jiffies + msecs_to_jiffies(delay); mutex_lock(&delayed_bios_lock); |