1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-04 09:09:56 +00:00

Fix return value from ng_uncallout().

callout_stop() recently started returning -1 when the callout is already
stopped, which is not handled by the netgraph code. Properly filter
the return value. Netgraph callers only want to know if the callout
was cancelled and not draining or already stopped.

Discussed with:		julian, glebius
MFC after:		2 weeks
This commit is contained in:
Hans Petter Selasky 2016-12-02 09:29:22 +00:00
parent c6e6b4fe3b
commit 0e493ed3a5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=309404

View File

@ -3825,7 +3825,11 @@ ng_uncallout(struct callout *c, node_p node)
}
c->c_arg = NULL;
return (rval);
/*
* Callers only want to know if the callout was cancelled and
* not draining or stopped.
*/
return (rval > 0);
}
/*