aboutsummaryrefslogtreecommitdiff
path: root/net/econet
diff options
context:
space:
mode:
Diffstat (limited to 'net/econet')
-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 8121bf0029e..2e1f836d424 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)
{
struct sock *sk=(struct sock *)data;
- if (!atomic_read(&sk->sk_wmem_alloc) &&
- !atomic_read(&sk->sk_rmem_alloc)) {
+ if (!sk_has_allocations(sk)) {
sk_free(sk);
return;
}
@@ -579,8 +578,7 @@ static int econet_release(struct socket *sock)
skb_queue_purge(&sk->sk_receive_queue);
- if (atomic_read(&sk->sk_rmem_alloc) ||
- atomic_read(&sk->sk_wmem_alloc)) {
+ if (sk_has_allocations(sk)) {
sk->sk_timer.data = (unsigned long)sk;
sk->sk_timer.expires = jiffies + HZ;
sk->sk_timer.function = econet_destroy_timer;