do_link_state_change() is executed in taskqueue context and in
general is allowed to sleep. Don't enter the epoch for the whole duration. If some event handlers need the epoch, they should handle that theirselves. Discussed with: hselasky
This commit is contained in:
parent
7c87e295c8
commit
ec1d6a72a3
@ -2313,11 +2313,9 @@ if_link_state_change(struct ifnet *ifp, int link_state)
|
||||
static void
|
||||
do_link_state_change(void *arg, int pending)
|
||||
{
|
||||
struct epoch_tracker et;
|
||||
struct ifnet *ifp;
|
||||
int link_state;
|
||||
|
||||
NET_EPOCH_ENTER(et);
|
||||
ifp = arg;
|
||||
link_state = ifp->if_link_state;
|
||||
|
||||
@ -2345,7 +2343,6 @@ do_link_state_change(void *arg, int pending)
|
||||
if (log_link_state_change)
|
||||
if_printf(ifp, "link state changed to %s\n",
|
||||
(link_state == LINK_STATE_UP) ? "UP" : "DOWN" );
|
||||
NET_EPOCH_EXIT(et);
|
||||
EVENTHANDLER_INVOKE(ifnet_link_event, ifp, link_state);
|
||||
CURVNET_RESTORE();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user