svn commit: r194694 - in stable/7/sys: . contrib/pf kern

Konstantin Belousov kib at FreeBSD.org
Tue Jun 23 10:49:57 UTC 2009


Author: kib
Date: Tue Jun 23 10:49:55 2009
New Revision: 194694
URL: http://svn.freebsd.org/changeset/base/194694

Log:
  MFC r192684:
  In lf_purgelocks(), assert that state->ls_pending is empty after we
  weeded out threads, and clean ls_active instead of ls_pending.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/kern/kern_lockf.c

Modified: stable/7/sys/kern/kern_lockf.c
==============================================================================
--- stable/7/sys/kern/kern_lockf.c	Tue Jun 23 10:47:42 2009	(r194693)
+++ stable/7/sys/kern/kern_lockf.c	Tue Jun 23 10:49:55 2009	(r194694)
@@ -816,7 +816,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);
 		}


More information about the svn-src-stable mailing list