Author: kib
Date: Sun May 24 12:37:55 2009
New Revision: 192684
URL: http://svn.freebsd.org/changeset/base/192684

Log:
  In lf_purgelocks(), assert that state->ls_pending is empty after we
  weeded out threads, and clean ls_active instead of ls_pending.
  
  Reviewed by:  dfr
  Tested by:    pho
  MFC after:    1 month

Modified:
  head/sys/kern/kern_lockf.c

Modified: head/sys/kern/kern_lockf.c
==============================================================================
--- head/sys/kern/kern_lockf.c  Sun May 24 12:33:16 2009        (r192683)
+++ head/sys/kern/kern_lockf.c  Sun May 24 12:37:55 2009        (r192684)
@@ -813,7 +813,9 @@ lf_purgelocks(struct vnode *vp, struct l
                 * above). We don't need to bother locking since we
                 * are the last thread using this state structure.
                 */
-               LIST_FOREACH_SAFE(lock, &state->ls_pending, lf_link, nlock) {
+               KASSERT(LIST_EMPTY(&state->ls_pending),
+                   ("lock pending for %p", state));
+               LIST_FOREACH_SAFE(lock, &state->ls_active, lf_link, nlock) {
                        LIST_REMOVE(lock, lf_link);
                        lf_free_lock(lock);
                }
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to