Re: [PATCH] net: bluetooth: delete the redundant refcnt increment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Nil,

> As the chan's refcnt is increased in l2cap_chan_create,
> no need to increase it again for l2cap_pi(sk)->chan.
> 
> Signed-off-by: Nil Yi <teroincn@xxxxxxx>
> ---
> net/bluetooth/l2cap_sock.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
> index c99d65ef1..4804c311d 100644
> --- a/net/bluetooth/l2cap_sock.c
> +++ b/net/bluetooth/l2cap_sock.c
> @@ -1831,8 +1831,7 @@ static struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock,
> 		return NULL;
> 	}
> 
> -	l2cap_chan_hold(chan);
> -
> +	/* chan's refcnt is held in l2cap_chan_create() */
> 	l2cap_pi(sk)->chan = chan;

can you be a bit more specific what this is fixing?

Regards

Marcel




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux