The option is in terms of msecs so we should be using msecs_to_jiffies()
to convert it instead of the other way around.

Fixes: 1be8d9c3da01 ("dm: add writecache target")
Signed-off-by: Dan Carpenter <[email protected]>

diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c
index f2ae02f22c43..c755e8bc6bdd 100644
--- a/drivers/md/dm-writecache.c
+++ b/drivers/md/dm-writecache.c
@@ -1995,7 +1995,7 @@ static int writecache_ctr(struct dm_target *ti, unsigned 
argc, char **argv)
                                goto invalid_optional;
                        if (autocommit_msecs > 3600000)
                                goto invalid_optional;
-                       wc->autocommit_jiffies = 
jiffies_to_msecs(autocommit_msecs);
+                       wc->autocommit_jiffies = 
msecs_to_jiffies(autocommit_msecs);
                        wc->autocommit_time_set = true;
                } else if (!strcasecmp(string, "fua")) {
                        if (WC_MODE_PMEM(wc)) {

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel

Reply via email to