From 727cbfea623b78d46ce8e0f8c931b5189f3fe2e0 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 23 Jan 2016 13:17:55 -0500 Subject: orangefs: get rid of MSECS_TO_JIFFIES All timeouts are in _seconds_, so all calls are of form MSECS_TO_JIFFIES(n * 1000), which is a convoluted way to spell n * HZ. Signed-off-by: Al Viro Signed-off-by: Mike Marshall --- fs/orangefs/waitqueue.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'fs/orangefs/waitqueue.c') diff --git a/fs/orangefs/waitqueue.c b/fs/orangefs/waitqueue.c index 699ffd8..cdbf57b 100644 --- a/fs/orangefs/waitqueue.c +++ b/fs/orangefs/waitqueue.c @@ -235,8 +235,8 @@ retry_servicing: * Wait for orangefs_bufmap_initialize() to wake me up * within the allotted time. */ - ret = schedule_timeout(MSECS_TO_JIFFIES - (1000 * ORANGEFS_BUFMAP_WAIT_TIMEOUT_SECS)); + ret = schedule_timeout( + ORANGEFS_BUFMAP_WAIT_TIMEOUT_SECS * HZ); gossip_debug(GOSSIP_WAIT_DEBUG, "Value returned from schedule_timeout:" @@ -375,8 +375,7 @@ static int wait_for_matching_downcall(struct orangefs_kernel_op_s *op) * subsequent attempts, we retry exactly once * with timeouts */ - if (!schedule_timeout(MSECS_TO_JIFFIES - (1000 * op_timeout_secs))) { + if (!schedule_timeout(op_timeout_secs * HZ)) { gossip_debug(GOSSIP_WAIT_DEBUG, "*** %s:" " operation timed out (tag" @@ -469,8 +468,7 @@ static int wait_for_cancellation_downcall(struct orangefs_kernel_op_s *op) "%s:About to call schedule_timeout.\n", __func__); spin_unlock(&op->lock); - ret = - schedule_timeout(MSECS_TO_JIFFIES(1000 * op_timeout_secs)); + ret = schedule_timeout(op_timeout_secs * HZ); gossip_debug(GOSSIP_WAIT_DEBUG, "%s:Value returned from schedule_timeout(%d).\n", -- cgit v1.1