Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Apr 2009 21:16:20 +0000 (UTC)
From:      Peter Wemm <peter@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r190655 - head/sys/kern
Message-ID:  <200904022116.n32LGK81076210@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: peter
Date: Thu Apr  2 21:16:20 2009
New Revision: 190655
URL: http://svn.freebsd.org/changeset/base/190655

Log:
  vn_vptocnp() unlocks the name cache and forgets to re-lock it before
  returning in one error case, and mistakenly unlocks it for the
  umount -f case.

Modified:
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/vfs_cache.c
==============================================================================
--- head/sys/kern/vfs_cache.c	Thu Apr  2 19:27:56 2009	(r190654)
+++ head/sys/kern/vfs_cache.c	Thu Apr  2 21:16:20 2009	(r190655)
@@ -971,6 +971,7 @@ vn_vptocnp(struct vnode **vp, char **bp,
 	vdrop(*vp);
 	VFS_UNLOCK_GIANT(vfslocked);
 	if (error) {
+		CACHE_RLOCK();
 		numfullpathfail2++;
 		return (error);
 	}
@@ -979,7 +980,6 @@ vn_vptocnp(struct vnode **vp, char **bp,
 	CACHE_RLOCK();
 	if ((*vp)->v_iflag & VI_DOOMED) {
 		/* forced unmount */
-		CACHE_RUNLOCK();
 		vdrop(*vp);
 		return (ENOENT);
 	}



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