aboutsummaryrefslogtreecommitdiffstats
path: root/net/econet/af_econet.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/econet/af_econet.c')
-rw-r--r--net/econet/af_econet.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index 8121bf0029e3..2e1f836d4240 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -540,8 +540,7 @@ static void econet_destroy_timer(unsigned long data)
540{ 540{
541 struct sock *sk=(struct sock *)data; 541 struct sock *sk=(struct sock *)data;
542 542
543 if (!atomic_read(&sk->sk_wmem_alloc) && 543 if (!sk_has_allocations(sk)) {
544 !atomic_read(&sk->sk_rmem_alloc)) {
545 sk_free(sk); 544 sk_free(sk);
546 return; 545 return;
547 } 546 }
@@ -579,8 +578,7 @@ static int econet_release(struct socket *sock)
579 578
580 skb_queue_purge(&sk->sk_receive_queue); 579 skb_queue_purge(&sk->sk_receive_queue);
581 580
582 if (atomic_read(&sk->sk_rmem_alloc) || 581 if (sk_has_allocations(sk)) {
583 atomic_read(&sk->sk_wmem_alloc)) {
584 sk->sk_timer.data = (unsigned long)sk; 582 sk->sk_timer.data = (unsigned long)sk;
585 sk->sk_timer.expires = jiffies + HZ; 583 sk->sk_timer.expires = jiffies + HZ;
586 sk->sk_timer.function = econet_destroy_timer; 584 sk->sk_timer.function = econet_destroy_timer;