svn commit: r190655 - head/sys/kern
Peter Wemm
peter at FreeBSD.org
Thu Apr 2 14:16:21 PDT 2009
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);
}
More information about the svn-src-head
mailing list