svn commit: r332880 - head/sys/kern
Mateusz Guzik
mjg at FreeBSD.org
Mon Apr 23 07:52:57 UTC 2018
Author: mjg
Date: Mon Apr 23 07:52:56 2018
New Revision: 332880
URL: https://svnweb.freebsd.org/changeset/base/332880
Log:
lockf: perform wakeup onlly when there is anybody waiting
Tested by: pho
Modified:
head/sys/kern/kern_lockf.c
Modified: head/sys/kern/kern_lockf.c
==============================================================================
--- head/sys/kern/kern_lockf.c Mon Apr 23 07:52:10 2018 (r332879)
+++ head/sys/kern/kern_lockf.c Mon Apr 23 07:52:56 2018 (r332880)
@@ -724,10 +724,11 @@ retry_setlock:
VI_LOCK(vp);
state->ls_threads--;
- wakeup(state);
if (LIST_EMPTY(&state->ls_active) && state->ls_threads == 0) {
KASSERT(LIST_EMPTY(&state->ls_pending),
("freeable state with pending locks"));
+ } else {
+ wakeup(state);
}
VI_UNLOCK(vp);
More information about the svn-src-head
mailing list