projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kill the obsolete thread_group_cputime_free() helper
[cascardo/linux.git]
/
net
/
x25
/
x25_timer.c
diff --git
a/net/x25/x25_timer.c
b/net/x25/x25_timer.c
index
0a92e1d
..
5c5db1a
100644
(file)
--- a/
net/x25/x25_timer.c
+++ b/
net/x25/x25_timer.c
@@
-3,7
+3,7
@@
*
* This is ALPHA test software. This code may break your machine,
* randomly fail to work with new releases, misbehave and/or generally
*
* This is ALPHA test software. This code may break your machine,
* randomly fail to work with new releases, misbehave and/or generally
- * screw up. It might even work.
+ * screw up. It might even work.
*
* This code REQUIRES 2.1.15 or higher
*
*
* This code REQUIRES 2.1.15 or higher
*
@@
-33,9
+33,7
@@
void x25_init_timers(struct sock *sk)
{
struct x25_sock *x25 = x25_sk(sk);
{
struct x25_sock *x25 = x25_sk(sk);
- init_timer(&x25->timer);
- x25->timer.data = (unsigned long)sk;
- x25->timer.function = &x25_timer_expiry;
+ setup_timer(&x25->timer, x25_timer_expiry, (unsigned long)sk);
/* initialized by sock_init_data */
sk->sk_timer.data = (unsigned long)sk;
/* initialized by sock_init_data */
sk->sk_timer.data = (unsigned long)sk;
@@
-99,8
+97,8
@@
static void x25_heartbeat_expiry(unsigned long param)
{
struct sock *sk = (struct sock *)param;
{
struct sock *sk = (struct sock *)param;
-
bh_lock_sock(sk);
- if (sock_owned_by_user(sk)) /* can currently only occur in state 3 */
+ bh_lock_sock(sk);
+ if (sock_owned_by_user(sk)) /* can currently only occur in state 3 */
goto restart_heartbeat;
switch (x25_sk(sk)->state) {
goto restart_heartbeat;
switch (x25_sk(sk)->state) {
@@
-114,8
+112,9
@@
static void x25_heartbeat_expiry(unsigned long param)
if (sock_flag(sk, SOCK_DESTROY) ||
(sk->sk_state == TCP_LISTEN &&
sock_flag(sk, SOCK_DEAD))) {
if (sock_flag(sk, SOCK_DESTROY) ||
(sk->sk_state == TCP_LISTEN &&
sock_flag(sk, SOCK_DEAD))) {
- x25_destroy_socket(sk);
- goto unlock;
+ bh_unlock_sock(sk);
+ x25_destroy_socket_from_timer(sk);
+ return;
}
break;
}
break;
@@
-128,7
+127,6
@@
static void x25_heartbeat_expiry(unsigned long param)
}
restart_heartbeat:
x25_start_heartbeat(sk);
}
restart_heartbeat:
x25_start_heartbeat(sk);
-unlock:
bh_unlock_sock(sk);
}
bh_unlock_sock(sk);
}