Revert r286880: If at first this change made sense, it turns out

it helps only the TCP timers callout(9) usage.  As the benefit for
others callout(9) usages did not reach a consensus the historical
usage should prevail.

Differential Revision:      https://reviews.freebsd.org/D3078
This commit is contained in:
Julien Charbon 2015-08-30 13:44:46 +00:00
parent d6de19ac2f
commit 2ea3089cb1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=287305

View File

@ -1151,7 +1151,6 @@ _callout_stop_safe(struct callout *c, int safe)
struct lock_class *class;
int direct, sq_locked, use_lock;
int not_on_a_list;
int not_running = 1;
if (safe)
WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, c->c_lock,
@ -1379,17 +1378,8 @@ _callout_stop_safe(struct callout *c, int safe)
}
}
callout_cc_del(c, cc);
if (!use_lock) {
/*
* If we are asked to stop a callout which is currently in progress
* and indeed impossible to stop then return 0.
*/
not_running = !(cc_exec_curr(cc, direct) == c);
}
CC_UNLOCK(cc);
return (not_running);
return (1);
}
void