diff options
author | Nicholas Mc Guire <hofrat@osadl.org> | 2015-03-17 12:47:58 +0100 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2015-04-15 18:10:21 +0200 |
commit | aca607ba242dde316794c0b607048fd5b688a520 (patch) | |
tree | c5b9934694c8e3240d1f220f528e2ab166e838ce /drivers/md/dm-delay.c | |
parent | dm log userspace base: fix compile warning (diff) | |
download | linux-aca607ba242dde316794c0b607048fd5b688a520.tar.xz linux-aca607ba242dde316794c0b607048fd5b688a520.zip |
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/dm-delay.c')
-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); |