Re: [RFC 1/2] Bluetooth: Create chan->ops->set_err()

Gustavo Padovan
2012-05-24T17:04:12Z

Hi Andrei,

* Andrei Emeltchenko <andrei.emeltchenko.news@gmail.com> [2012-05-24 11:26:04 +0300]:

> Hi Gustavo,
>
> On Thu, May 24, 2012 at 04:00:16AM -0300, Gustavo Padovan wrote:
> > - lock_sock(sk);
> > - __l2cap_state_change(chan, BT_DISCONN);
> > - __l2cap_chan_set_err(chan, err);
> > - release_sock(sk);
> > + l2cap_state_change(chan, BT_DISCONN);
> > + if(chan->ops->set_err)
> > + chan->ops->set_err(chan->data, err);
>
> I do not know can it be done somehow better, currently we lock and unlock
> sockets for each operation.

I'm having trouble to get your point, could you please explain?

Gustavo