diff options
Diffstat (limited to 'net/ax25/af_ax25.c')
-rw-r--r-- | net/ax25/af_ax25.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index b4725ff317c0..1bc0e85f04a5 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c @@ -330,10 +330,9 @@ void ax25_destroy_socket(ax25_cb *ax25) if (atomic_read(&ax25->sk->sk_wmem_alloc) || atomic_read(&ax25->sk->sk_rmem_alloc)) { /* Defer: outstanding buffers */ - init_timer(&ax25->dtimer); + setup_timer(&ax25->dtimer, ax25_destroy_timer, + (unsigned long)ax25); ax25->dtimer.expires = jiffies + 2 * HZ; - ax25->dtimer.function = ax25_destroy_timer; - ax25->dtimer.data = (unsigned long)ax25; add_timer(&ax25->dtimer); } else { struct sock *sk=ax25->sk; @@ -571,7 +570,7 @@ static int ax25_setsockopt(struct socket *sock, int level, int optname, res = -EINVAL; break; } - ax25->rtt = (opt * HZ) / 2; + ax25->rtt = (opt * HZ) >> 1; ax25->t1 = opt * HZ; break; @@ -1864,6 +1863,7 @@ static int ax25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) #ifdef CONFIG_PROC_FS static void *ax25_info_start(struct seq_file *seq, loff_t *pos) + __acquires(ax25_list_lock) { struct ax25_cb *ax25; struct hlist_node *node; @@ -1887,6 +1887,7 @@ static void *ax25_info_next(struct seq_file *seq, void *v, loff_t *pos) } static void ax25_info_stop(struct seq_file *seq, void *v) + __releases(ax25_list_lock) { spin_unlock_bh(&ax25_list_lock); } |