diff options
Diffstat (limited to 'net/ax25/af_ax25.c')
-rw-r--r-- | net/ax25/af_ax25.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index fd9d06f291dc..61b35b955490 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c | |||
@@ -330,8 +330,7 @@ void ax25_destroy_socket(ax25_cb *ax25) | |||
330 | } | 330 | } |
331 | 331 | ||
332 | if (ax25->sk != NULL) { | 332 | if (ax25->sk != NULL) { |
333 | if (atomic_read(&ax25->sk->sk_wmem_alloc) || | 333 | if (sk_has_allocations(ax25->sk)) { |
334 | atomic_read(&ax25->sk->sk_rmem_alloc)) { | ||
335 | /* Defer: outstanding buffers */ | 334 | /* Defer: outstanding buffers */ |
336 | setup_timer(&ax25->dtimer, ax25_destroy_timer, | 335 | setup_timer(&ax25->dtimer, ax25_destroy_timer, |
337 | (unsigned long)ax25); | 336 | (unsigned long)ax25); |