From ff714119a6d2e2fc3c2e046d77801afa83a9ace2 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 13 Nov 2014 09:46:04 +0200 Subject: Bluetooth: Fix L2CAP nesting level initialization location There's no reason why all users of L2CAP would need to worry about initializing chan->nesting to L2CAP_NESTING_NORMAL (which is important since 0 is the same as NESTING_SMP). This patch moves the initialization to the common place that's used to create all new channels, i.e. the l2cap_chan_create() function. Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann --- net/bluetooth/l2cap_sock.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'net/bluetooth/l2cap_sock.c') diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index 7913c28c643d..a5aa9f92b5e2 100644 --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c @@ -1510,9 +1510,6 @@ static void l2cap_sock_init(struct sock *sk, struct sock *parent) l2cap_chan_set_defaults(chan); } - /* Set default lock nesting level */ - atomic_set(&chan->nesting, L2CAP_NESTING_NORMAL); - /* Default config options */ chan->flush_to = L2CAP_DEFAULT_FLUSH_TO; -- cgit