summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/kern/vfs_export.c5
-rw-r--r--sys/kern/vfs_subr.c5
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index a6bae88f2ada..f72095a11b81 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 a6bae88f2ada..f72095a11b81 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;