netgraph: pass return value from callout_stop() unmodified to callers of
ng_uncallout. Most of them do not check it anyway, so very little node changes are required. Reviewed by: mjg, markj Differential Revision: https://reviews.freebsd.org/D31476
This commit is contained in:
parent
9bdff593ea
commit
26cf4b53d9
@ -391,7 +391,7 @@ ng_hci_command_untimeout(ng_hci_unit_p unit)
|
||||
panic(
|
||||
"%s: %s - No command timeout!\n", __func__, NG_NODE_NAME(unit->node));
|
||||
|
||||
if (ng_uncallout(&unit->cmd_timo, unit->node) == 0)
|
||||
if (ng_uncallout(&unit->cmd_timo, unit->node) < 1)
|
||||
return (ETIMEDOUT);
|
||||
|
||||
unit->state &= ~NG_HCI_UNIT_COMMAND_PENDING;
|
||||
@ -432,7 +432,7 @@ ng_hci_con_untimeout(ng_hci_unit_con_p con)
|
||||
panic(
|
||||
"%s: %s - No connection timeout!\n", __func__, NG_NODE_NAME(con->unit->node));
|
||||
|
||||
if (ng_uncallout(&con->con_timo, con->unit->node) == 0)
|
||||
if (ng_uncallout(&con->con_timo, con->unit->node) < 1)
|
||||
return (ETIMEDOUT);
|
||||
|
||||
con->flags &= ~NG_HCI_CON_TIMEOUT_PENDING;
|
||||
|
@ -235,7 +235,7 @@ ng_l2cap_discon_untimeout(ng_l2cap_con_p con)
|
||||
__func__, NG_NODE_NAME(con->l2cap->node),
|
||||
con->state, con->flags);
|
||||
|
||||
if (ng_uncallout(&con->con_timo, con->l2cap->node) == 0)
|
||||
if (ng_uncallout(&con->con_timo, con->l2cap->node) < 1)
|
||||
return (ETIMEDOUT);
|
||||
|
||||
con->flags &= ~NG_L2CAP_CON_AUTO_DISCON_TIMO;
|
||||
@ -534,7 +534,7 @@ ng_l2cap_lp_untimeout(ng_l2cap_con_p con)
|
||||
__func__, NG_NODE_NAME(con->l2cap->node),
|
||||
con->state, con->flags);
|
||||
|
||||
if (ng_uncallout(&con->con_timo, con->l2cap->node) == 0)
|
||||
if (ng_uncallout(&con->con_timo, con->l2cap->node) < 1)
|
||||
return (ETIMEDOUT);
|
||||
|
||||
con->flags &= ~NG_L2CAP_CON_LP_TIMO;
|
||||
@ -579,7 +579,7 @@ ng_l2cap_command_untimeout(ng_l2cap_cmd_p cmd)
|
||||
__func__, NG_NODE_NAME(cmd->con->l2cap->node),
|
||||
cmd->code, cmd->flags);
|
||||
|
||||
if (ng_uncallout(&cmd->timo, cmd->con->l2cap->node) == 0)
|
||||
if (ng_uncallout(&cmd->timo, cmd->con->l2cap->node) < 1)
|
||||
return (ETIMEDOUT);
|
||||
|
||||
cmd->flags &= ~NG_L2CAP_CMD_PENDING;
|
||||
|
@ -3840,11 +3840,7 @@ ng_uncallout(struct callout *c, node_p node)
|
||||
}
|
||||
c->c_arg = NULL;
|
||||
|
||||
/*
|
||||
* Callers only want to know if the callout was cancelled and
|
||||
* not draining or stopped.
|
||||
*/
|
||||
return (rval > 0);
|
||||
return (rval);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user