summaryrefslogtreecommitdiff
path: root/net/decnet/dn_timer.c
diff options
context:
space:
mode:
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2011-12-17 22:00:49 (GMT)
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2011-12-17 22:00:49 (GMT)
commita4581b35e1bc80becf240238bc787a5ec2727db0 (patch)
tree34cbf36101639403a766e74deb36e7015d871b39 /net/decnet/dn_timer.c
parentf940b88d3a57594289455ea99a93a8ddc5c4af06 (diff)
parent384703b8e6cd4c8ef08512e596024e028c91c339 (diff)
downloadlinux-fsl-qoriq-a4581b35e1bc80becf240238bc787a5ec2727db0.tar.xz
Merge commit 'v3.2-rc6' into fbdev-next
Diffstat (limited to 'net/decnet/dn_timer.c')
-rw-r--r--net/decnet/dn_timer.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/net/decnet/dn_timer.c b/net/decnet/dn_timer.c
index 67f691b..d9c150c 100644
--- a/net/decnet/dn_timer.c
+++ b/net/decnet/dn_timer.c
@@ -36,16 +36,13 @@ static void dn_slow_timer(unsigned long arg);
void dn_start_slow_timer(struct sock *sk)
{
- sk->sk_timer.expires = jiffies + SLOW_INTERVAL;
- sk->sk_timer.function = dn_slow_timer;
- sk->sk_timer.data = (unsigned long)sk;
-
- add_timer(&sk->sk_timer);
+ setup_timer(&sk->sk_timer, dn_slow_timer, (unsigned long)sk);
+ sk_reset_timer(sk, &sk->sk_timer, jiffies + SLOW_INTERVAL);
}
void dn_stop_slow_timer(struct sock *sk)
{
- del_timer(&sk->sk_timer);
+ sk_stop_timer(sk, &sk->sk_timer);
}
static void dn_slow_timer(unsigned long arg)
@@ -53,12 +50,10 @@ static void dn_slow_timer(unsigned long arg)
struct sock *sk = (struct sock *)arg;
struct dn_scp *scp = DN_SK(sk);
- sock_hold(sk);
bh_lock_sock(sk);
if (sock_owned_by_user(sk)) {
- sk->sk_timer.expires = jiffies + HZ / 10;
- add_timer(&sk->sk_timer);
+ sk_reset_timer(sk, &sk->sk_timer, jiffies + HZ / 10);
goto out;
}
@@ -100,9 +95,7 @@ static void dn_slow_timer(unsigned long arg)
scp->keepalive_fxn(sk);
}
- sk->sk_timer.expires = jiffies + SLOW_INTERVAL;
-
- add_timer(&sk->sk_timer);
+ sk_reset_timer(sk, &sk->sk_timer, jiffies + SLOW_INTERVAL);
out:
bh_unlock_sock(sk);
sock_put(sk);