summaryrefslogtreecommitdiff
path: root/sys/nfs/nfs_subs.c
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2013-11-27 16:02:55 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2013-11-27 16:02:55 +0000
commitc62caeda5d3bb75a0f305334edbba3c58de492a7 (patch)
tree1ec34d8d1fa0d3b56ba6f615e2a352477f60a7fa /sys/nfs/nfs_subs.c
parentf34e69cef2faf9e86a1b9dec0db584f5ab4fbe1a (diff)
If the v_type is going to change when loading the NFS attribute cache,
purge the vnode from the namecache first. This prevents cache_purge() from later getting confused and trying to cache_zap() a namecache entry multiple times over, due to cache_zap() believing that the entry does not need to be removed from the vnode destinations queue. ok beck@
Diffstat (limited to 'sys/nfs/nfs_subs.c')
-rw-r--r--sys/nfs/nfs_subs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c
index d76c8dcadbf..0dad3f82628 100644
--- a/sys/nfs/nfs_subs.c
+++ b/sys/nfs/nfs_subs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_subs.c,v 1.114 2013/08/13 05:52:25 guenther Exp $ */
+/* $OpenBSD: nfs_subs.c,v 1.115 2013/11/27 16:02:54 jsing Exp $ */
/* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */
/*
@@ -991,6 +991,7 @@ nfs_loadattrcache(struct vnode **vpp, struct mbuf **mdp, caddr_t *dposp,
*/
np = VTONFS(vp);
if (vp->v_type != vtyp) {
+ cache_purge(vp);
vp->v_type = vtyp;
if (vp->v_type == VFIFO) {
#ifndef FIFO