summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_sync.c
diff options
context:
space:
mode:
authorart <art@openbsd.org>2005-05-31 11:35:33 +0000
committerart <art@openbsd.org>2005-05-31 11:35:33 +0000
commit793a9d87c5a69b5fdce00c201989dfa857ccc53c (patch)
tree569095e98c2b1f8b0c27cb332129edbe976e59a9 /sys/kern/vfs_sync.c
parentProtect p_timer with splclock. It can be fiddled with in hardclock (but (diff)
downloadwireguard-openbsd-793a9d87c5a69b5fdce00c201989dfa857ccc53c.tar.xz
wireguard-openbsd-793a9d87c5a69b5fdce00c201989dfa857ccc53c.zip
Protect the run queues with SCHED_LOCK, not just spl (ot nothing at all in
one case fixed here). miod@ "appears to be harmless" markus@ ok
Diffstat (limited to 'sys/kern/vfs_sync.c')
-rw-r--r--sys/kern/vfs_sync.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/vfs_sync.c b/sys/kern/vfs_sync.c
index 4d74da6a3b2..449d4de4e4e 100644
--- a/sys/kern/vfs_sync.c
+++ b/sys/kern/vfs_sync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_sync.c,v 1.31 2005/05/29 03:20:42 deraadt Exp $ */
+/* $OpenBSD: vfs_sync.c,v 1.32 2005/05/31 11:35:33 art Exp $ */
/*
* Portions of this code are:
@@ -50,6 +50,7 @@
#include <sys/malloc.h>
#include <sys/kernel.h>
+#include <sys/sched.h>
#ifdef FFS_SOFTUPDATES
int softdep_process_worklist(struct mount *);
@@ -244,10 +245,10 @@ speedup_syncer()
{
int s;
- s = splhigh();
+ SCHED_LOCK(s);
if (syncerproc && syncerproc->p_wchan == &lbolt)
setrunnable(syncerproc);
- splx(s);
+ SCHED_UNLOCK(s);
if (rushjob < syncdelay / 2) {
rushjob += 1;
stat_rush_requests += 1;