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); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"