Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276236
b: refs/heads/master
c: 8a6e77d
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Nov 26, 2011
1 parent e3eb83c commit 27a70e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fc0b927d9a5024e138c4318fe19a590f23e3eeec
refs/heads/master: 8a6e77d5209e459a9ec5c268c39800c06cd1dc86
17 changes: 5 additions & 12 deletions trunk/net/decnet/dn_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,24 @@ 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)
{
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;
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 27a70e0

Please sign in to comment.