From 77d3ac29e92a3eee07ea5b553bddc85cdf1fdae4 Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 2 Apr 2009 21:16:20 +0000 Subject: 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. --- sys/kern/vfs_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/kern') 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); } -- cgit v1.1