aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/af_bluetooth.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/af_bluetooth.c')
-rw-r--r--net/bluetooth/af_bluetooth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
index 02b9baa1930b..0250e0600150 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -337,7 +337,7 @@ int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
337 if (sk->sk_state == BT_LISTEN) 337 if (sk->sk_state == BT_LISTEN)
338 return -EINVAL; 338 return -EINVAL;
339 339
340 amount = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc); 340 amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
341 if (amount < 0) 341 if (amount < 0)
342 amount = 0; 342 amount = 0;
343 err = put_user(amount, (int __user *) arg); 343 err = put_user(amount, (int __user *) arg);