summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorart <art@openbsd.org>2001-10-11 14:44:10 +0000
committerart <art@openbsd.org>2001-10-11 14:44:10 +0000
commitb4dc3dc55010159b2cc8f12731a8f505bd79b2f6 (patch)
treed36f71c392c851813f6b5f6d86841b69f1e08883
parentdelay detach of session if a channel gets closed but the child is still alive. (diff)
downloadwireguard-openbsd-b4dc3dc55010159b2cc8f12731a8f505bd79b2f6.tar.xz
wireguard-openbsd-b4dc3dc55010159b2cc8f12731a8f505bd79b2f6.zip
Fix flawed logic when deciding if we should sleep when
we are below the low watermark or if we should try to use up all buffers.
-rw-r--r--sys/kern/vfs_bio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 60383440480..97be296ac4d 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_bio.c,v 1.44 2001/10/11 08:07:12 gluk Exp $ */
+/* $OpenBSD: vfs_bio.c,v 1.45 2001/10/11 14:44:10 art Exp $ */
/* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */
/*-
@@ -848,8 +848,8 @@ start:
if (numdirtypages >= hidirtypages)
wakeup(&bd_req);
- if ((numcleanpages <= locleanpages)
- && (curproc != syncerproc || curproc != cleanerproc)) {
+ if ((numcleanpages <= locleanpages) &&
+ curproc != syncerproc && curproc != cleanerproc) {
needbuffer++;
error = tsleep(&needbuffer, slpflag|(PRIBIO+1), "getnewbuf",
slptimeo);