[openib-general] Re: [PATCH] sdp_inet: fix schedule_timeout() usage
Michael S. Tsirkin
mst at mellanox.co.il
Wed Jun 29 14:24:10 PDT 2005
Quoting r. Nishanth Aravamudan <nacc at us.ibm.com>:
> > > @@ -710,11 +711,12 @@
> > > if (!accept_conn) {
> > > DECLARE_WAITQUEUE(wait, current);
> > > add_wait_queue(listen_sk->sk_sleep, &wait);
> > > - set_current_state(TASK_INTERRUPTIBLE);
> > >
> > > while (timeout > 0 &&
> > > listen_conn->state == SDP_CONN_ST_LISTEN &&
> > > !listen_conn->backlog_cnt) {
> > > +
> > > + set_current_state(TASK_INTERRUPTIBLE);
> > > sdp_conn_unlock(listen_conn);
> > > timeout = schedule_timeout(timeout);
> > > sdp_conn_lock(listen_conn);
What is the reason set_current_state is done before sdp_conn_unlock
and not just before schedule_timeout?
--
MST
More information about the general
mailing list