Bluetooth: SCO: Use kref to track lifetime of sco_conn
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 1 Oct 2024 19:46:10 +0000 (15:46 -0400)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 14 Nov 2024 20:39:03 +0000 (15:39 -0500)
commite6720779ae612a14ac4ba7fe4fd5b27d900d932c
treeb8cbe675a29004e0b6f815d20445868e2483a2a7
parent96e7c4273560be4744ba8c444bc6969745315251
Bluetooth: SCO: Use kref to track lifetime of sco_conn

This make use of kref to keep track of reference of sco_conn which
allows better tracking of its lifetime with usage of things like
kref_get_unless_zero in a similar way as used in l2cap_chan.

In addition to it remove call to sco_sock_set_timer on __sco_sock_close
since at that point it is useless to set a timer as the sk will be freed
there is nothing to be done in sco_sock_timeout.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/sco.c