mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-25 16:13:17 +00:00
Use proper mutex locking when calling setrunnable from speedup_syncer().
Submitted by: Tor.Egge@fast.no
This commit is contained in:
parent
5d24b61a76
commit
0bf3b91d8a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=69950
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user