Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jan 2010 20:09:20 +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: r203089 - stable/7/sys/fs/pseudofs
Message-ID:  <201001272009.o0RK9Kw8015811@svn.freebsd.org>

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



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