summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2009-04-02 21:16:20 +0000
committerpeter <peter@FreeBSD.org>2009-04-02 21:16:20 +0000
commit77d3ac29e92a3eee07ea5b553bddc85cdf1fdae4 (patch)
treee90aefe36c052f789e8a4c6d03689643377023a5 /sys/kern
parent70d654efaf1cef3617f178edf8e138930eac6b2f (diff)
downloadFreeBSD-src-77d3ac29e92a3eee07ea5b553bddc85cdf1fdae4.zip
FreeBSD-src-77d3ac29e92a3eee07ea5b553bddc85cdf1fdae4.tar.gz
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.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index 6427f65..ea19e13 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -971,6 +971,7 @@ vn_vptocnp(struct vnode **vp, char **bp, char *buf, u_int *buflen)
vdrop(*vp);
VFS_UNLOCK_GIANT(vfslocked);
if (error) {
+ CACHE_RLOCK();
numfullpathfail2++;
return (error);
}
@@ -979,7 +980,6 @@ vn_vptocnp(struct vnode **vp, char **bp, char *buf, u_int *buflen)
CACHE_RLOCK();
if ((*vp)->v_iflag & VI_DOOMED) {
/* forced unmount */
- CACHE_RUNLOCK();
vdrop(*vp);
return (ENOENT);
}
OpenPOWER on IntegriCloud