diff options
Diffstat (limited to 'net/irda')
-rw-r--r-- | net/irda/af_irda.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index 3eb5bcc75f99..5922febe25c4 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c | |||
@@ -1762,7 +1762,8 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
1762 | switch (cmd) { | 1762 | switch (cmd) { |
1763 | case TIOCOUTQ: { | 1763 | case TIOCOUTQ: { |
1764 | long amount; | 1764 | long amount; |
1765 | amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc); | 1765 | |
1766 | amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk); | ||
1766 | if (amount < 0) | 1767 | if (amount < 0) |
1767 | amount = 0; | 1768 | amount = 0; |
1768 | if (put_user(amount, (unsigned int __user *)arg)) | 1769 | if (put_user(amount, (unsigned int __user *)arg)) |