Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jun 2009 10:49:56 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r194694 - in stable/7/sys: . contrib/pf kern
Message-ID:  <200906231049.n5NAnuuC073753@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906231049.n5NAnuuC073753>