]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/econet/af_econet.c
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
[karo-tx-linux.git] / net / econet / af_econet.c
index 8121bf0029e305c6d13267c9aeee364647fcea97..2e1f836d424064ffe346321e053c136f86682545 100644 (file)
@@ -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;