Remove unnecessary call to splnet when setting an accept filter
since we are already at splnet.
This commit is contained in:
parent
8c23a0a271
commit
030f7b3faa
sys/kern
@ -107,18 +107,15 @@ soisconnected(so)
|
||||
struct socket *so;
|
||||
{
|
||||
struct socket *head = so->so_head;
|
||||
int s;
|
||||
|
||||
so->so_state &= ~(SS_ISCONNECTING|SS_ISDISCONNECTING|SS_ISCONFIRMING);
|
||||
so->so_state |= SS_ISCONNECTED;
|
||||
if (head && (so->so_state & SS_INCOMP)) {
|
||||
if ((so->so_options & SO_ACCEPTFILTER) != 0) {
|
||||
s = splnet();
|
||||
so->so_upcall = head->so_accf->so_accept_filter->accf_callback;
|
||||
so->so_upcallarg = head->so_accf->so_accept_filter_arg;
|
||||
so->so_rcv.sb_flags |= SB_UPCALL;
|
||||
so->so_options &= ~SO_ACCEPTFILTER;
|
||||
splx(s);
|
||||
so->so_upcall(so, so->so_upcallarg, 0);
|
||||
return;
|
||||
}
|
||||
|
@ -107,18 +107,15 @@ soisconnected(so)
|
||||
struct socket *so;
|
||||
{
|
||||
struct socket *head = so->so_head;
|
||||
int s;
|
||||
|
||||
so->so_state &= ~(SS_ISCONNECTING|SS_ISDISCONNECTING|SS_ISCONFIRMING);
|
||||
so->so_state |= SS_ISCONNECTED;
|
||||
if (head && (so->so_state & SS_INCOMP)) {
|
||||
if ((so->so_options & SO_ACCEPTFILTER) != 0) {
|
||||
s = splnet();
|
||||
so->so_upcall = head->so_accf->so_accept_filter->accf_callback;
|
||||
so->so_upcallarg = head->so_accf->so_accept_filter_arg;
|
||||
so->so_rcv.sb_flags |= SB_UPCALL;
|
||||
so->so_options &= ~SO_ACCEPTFILTER;
|
||||
splx(s);
|
||||
so->so_upcall(so, so->so_upcallarg, 0);
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user