Use proper mutex locking when calling setrunnable from speedup_syncer().

Submitted by:	Tor.Egge@fast.no
This commit is contained in:
Kirk McKusick 2000-12-13 01:06:53 +00:00
parent 5d24b61a76
commit 0bf3b91d8a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=69950
2 changed files with 4 additions and 6 deletions

View File

@ -1103,12 +1103,11 @@ sched_sync(void)
int
speedup_syncer()
{
int s;
s = splhigh();
mtx_enter(&sched_lock, MTX_SPIN);
if (updateproc->p_wchan == &lbolt)
setrunnable(updateproc);
splx(s);
mtx_exit(&sched_lock, MTX_SPIN);
if (rushjob < syncdelay / 2) {
rushjob += 1;
stat_rush_requests += 1;

View File

@ -1103,12 +1103,11 @@ sched_sync(void)
int
speedup_syncer()
{
int s;
s = splhigh();
mtx_enter(&sched_lock, MTX_SPIN);
if (updateproc->p_wchan == &lbolt)
setrunnable(updateproc);
splx(s);
mtx_exit(&sched_lock, MTX_SPIN);
if (rushjob < syncdelay / 2) {
rushjob += 1;
stat_rush_requests += 1;