aboutsummaryrefslogtreecommitdiffstats
path: root/net/irda/af_irda.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/irda/af_irda.c')
-rw-r--r--net/irda/af_irda.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index 3eb5bcc75f9..cb762c8723e 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -913,9 +913,6 @@ static int irda_accept(struct socket *sock, struct socket *newsock, int flags)
913 /* Clean up the original one to keep it in listen state */ 913 /* Clean up the original one to keep it in listen state */
914 irttp_listen(self->tsap); 914 irttp_listen(self->tsap);
915 915
916 /* Wow ! What is that ? Jean II */
917 skb->sk = NULL;
918 skb->destructor = NULL;
919 kfree_skb(skb); 916 kfree_skb(skb);
920 sk->sk_ack_backlog--; 917 sk->sk_ack_backlog--;
921 918
@@ -1762,7 +1759,8 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1762 switch (cmd) { 1759 switch (cmd) {
1763 case TIOCOUTQ: { 1760 case TIOCOUTQ: {
1764 long amount; 1761 long amount;
1765 amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc); 1762
1763 amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
1766 if (amount < 0) 1764 if (amount < 0)
1767 amount = 0; 1765 amount = 0;
1768 if (put_user(amount, (unsigned int __user *)arg)) 1766 if (put_user(amount, (unsigned int __user *)arg))