svn commit: r203089 - stable/7/sys/fs/pseudofs

Konstantin Belousov kib at FreeBSD.org
Wed Jan 27 20:09:20 UTC 2010


Author: kib
Date: Wed Jan 27 20:09:20 2010
New Revision: 203089
URL: http://svn.freebsd.org/changeset/base/203089

Log:
  MFC r196921:
  Do not decrement pfs_vncache_entries for the vnode that was not in the
  list.
  
  Reminded by:	des
  Approved by:	re (kensmith)

Modified:
  stable/7/sys/fs/pseudofs/pseudofs_vncache.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/fs/pseudofs/pseudofs_vncache.c
==============================================================================
--- stable/7/sys/fs/pseudofs/pseudofs_vncache.c	Wed Jan 27 19:57:34 2010	(r203088)
+++ stable/7/sys/fs/pseudofs/pseudofs_vncache.c	Wed Jan 27 20:09:20 2010	(r203089)
@@ -246,11 +246,13 @@ pfs_vncache_free(struct vnode *vp)
 	KASSERT(pvd != NULL, ("pfs_vncache_free(): no vnode data\n"));
 	if (pvd->pvd_next)
 		pvd->pvd_next->pvd_prev = pvd->pvd_prev;
-	if (pvd->pvd_prev)
+	if (pvd->pvd_prev) {
 		pvd->pvd_prev->pvd_next = pvd->pvd_next;
-	else if (pfs_vncache == pvd)
+		--pfs_vncache_entries;
+	} else if (pfs_vncache == pvd) {
 		pfs_vncache = pvd->pvd_next;
-	--pfs_vncache_entries;
+		--pfs_vncache_entries;
+	}
 	mtx_unlock(&pfs_vncache_mutex);
 
 	FREE(pvd, M_PFSVNCACHE);


More information about the svn-src-stable mailing list