diff options
author | kmacy <kmacy@FreeBSD.org> | 2008-03-24 05:21:10 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2008-03-24 05:21:10 +0000 |
commit | 9fbcabc6c779f9d99e0138a29190ec771ef10ad4 (patch) | |
tree | 86321b974498ba1f75f092038191988df7da5607 /sys/dev | |
parent | 3ad75daf19094d458a872196403a2d5a77437da1 (diff) | |
download | FreeBSD-src-9fbcabc6c779f9d99e0138a29190ec771ef10ad4.zip FreeBSD-src-9fbcabc6c779f9d99e0138a29190ec771ef10ad4.tar.gz |
remove unneccessary tcbinfo lock acquisitions - set tp to null affter calling enter_timewait as we no longer own the inpcb
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c b/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c index eed3ac8..e41154c 100644 --- a/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c +++ b/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c @@ -792,7 +792,6 @@ cxgb_toe_detach(struct tcpcb *tp) * XXX how do we handle teardown in the SYN_SENT state? * */ - INP_INFO_WLOCK(&tcbinfo); inp_wlock_assert(tp->t_inpcb); toep = tp->t_toe; toep->tp_tp = NULL; @@ -802,7 +801,6 @@ cxgb_toe_detach(struct tcpcb *tp) */ tp->t_flags &= ~TF_TOE; tp->t_toe = NULL; - INP_INFO_WUNLOCK(&tcbinfo); } @@ -1368,7 +1366,6 @@ active_open_failed(struct toepcb *toep, struct mbuf *m) struct cpl_act_open_rpl *rpl = cplhdr(m); struct inpcb *inp; - INP_INFO_WLOCK(&tcbinfo); if (toep->tp_tp == NULL) goto done; @@ -1391,7 +1388,6 @@ active_open_failed(struct toepcb *toep, struct mbuf *m) fail_act_open(toep, act_open_rpl_status_to_errno(rpl->status)); inp_wunlock(inp); done: - INP_INFO_WUNLOCK(&tcbinfo); m_free(m); } @@ -2470,6 +2466,7 @@ do_peer_fin(struct socket *so, struct mbuf *m) tp = tcp_close(tp); } else { enter_timewait(so); + tp = NULL; } break; default: @@ -2536,6 +2533,7 @@ process_close_con_rpl(struct socket *so, struct mbuf *m) } else { enter_timewait(so); + tp = NULL; soisdisconnected(so); } break; |