diff options
author | mckusick <mckusick@FreeBSD.org> | 2000-12-13 01:06:53 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2000-12-13 01:06:53 +0000 |
commit | 8fb19aa301bf05a6d0e411ceb787bf9d53acf8a7 (patch) | |
tree | 9af378eb7c55fed4e7a28935cf5992a35163855d /sys | |
parent | a2dc6debf4a9c4d3bef7882c26c63e0b0e5947c8 (diff) | |
download | FreeBSD-src-8fb19aa301bf05a6d0e411ceb787bf9d53acf8a7.zip FreeBSD-src-8fb19aa301bf05a6d0e411ceb787bf9d53acf8a7.tar.gz |
Use proper mutex locking when calling setrunnable from speedup_syncer().
Submitted by: Tor.Egge@fast.no
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_export.c | 5 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index a6bae88..f72095a 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -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; diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index a6bae88..f72095a 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -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; |