]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
SUNRPC: use jiffies_to_msecs for converting jiffies
authorNicholas Mc Guire <hofrat@osadl.org>
Tue, 3 Mar 2015 09:24:25 +0000 (04:24 -0500)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 12 Mar 2015 15:53:55 +0000 (11:53 -0400)
Use jiffies_to_msecs for converting jiffies as it handles all of the corner
cases reliably and also helps readability.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
net/sunrpc/sched.c

index b91fd9c597b45158cc9ce88a8fb4caa5130faf96..c234e7ff2bf046ab5ec8c6e8a8f58ca6c22abe1d 100644 (file)
@@ -90,7 +90,7 @@ __rpc_add_timer(struct rpc_wait_queue *queue, struct rpc_task *task)
                return;
 
        dprintk("RPC: %5u setting alarm for %lu ms\n",
-                       task->tk_pid, task->tk_timeout * 1000 / HZ);
+                       task->tk_pid, jiffies_to_msecs(task->tk_timeout));
 
        task->u.tk_wait.expires = jiffies + task->tk_timeout;
        if (list_empty(&queue->timer_list.list) || time_before(task->u.tk_wait.expires, queue->timer_list.expires))