Changed order of release of vnode/object to fix a problem where the vnode

is freed with an old object still attached (subsequently causing a panic).
Fixes NFS server panic "object/pager mismatch".

Submitted by:	John Dyson
This commit is contained in:
David Greenman 1995-02-06 02:20:40 +00:00
parent 30ad8d9349
commit 081129c5e3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6210
4 changed files with 28 additions and 16 deletions

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94
* $Id: nfs_subs.c,v 1.7 1994/10/17 17:47:37 phk Exp $
* $Id: nfs_subs.c,v 1.8 1995/01/09 16:05:08 davidg Exp $
*/
/*
@ -1207,17 +1207,20 @@ nfsrv_vmio( struct vnode *vp) {
int
nfsrv_vput( struct vnode *vp) {
if( (vp->v_flag & VVMIO) && vp->v_vmdata) {
vput( vp);
vm_object_deallocate( (vm_object_t) vp->v_vmdata);
} else {
vput( vp);
}
vput( vp);
return 0;
}
int
nfsrv_vrele( struct vnode *vp) {
if( (vp->v_flag & VVMIO) && vp->v_vmdata) {
vrele( vp);
vm_object_deallocate( (vm_object_t) vp->v_vmdata);
} else {
vrele( vp);
}
vrele( vp);
return 0;
}

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94
* $Id: nfs_subs.c,v 1.7 1994/10/17 17:47:37 phk Exp $
* $Id: nfs_subs.c,v 1.8 1995/01/09 16:05:08 davidg Exp $
*/
/*
@ -1207,17 +1207,20 @@ nfsrv_vmio( struct vnode *vp) {
int
nfsrv_vput( struct vnode *vp) {
if( (vp->v_flag & VVMIO) && vp->v_vmdata) {
vput( vp);
vm_object_deallocate( (vm_object_t) vp->v_vmdata);
} else {
vput( vp);
}
vput( vp);
return 0;
}
int
nfsrv_vrele( struct vnode *vp) {
if( (vp->v_flag & VVMIO) && vp->v_vmdata) {
vrele( vp);
vm_object_deallocate( (vm_object_t) vp->v_vmdata);
} else {
vrele( vp);
}
vrele( vp);
return 0;
}

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94
* $Id: nfs_subs.c,v 1.7 1994/10/17 17:47:37 phk Exp $
* $Id: nfs_subs.c,v 1.8 1995/01/09 16:05:08 davidg Exp $
*/
/*
@ -1207,17 +1207,20 @@ nfsrv_vmio( struct vnode *vp) {
int
nfsrv_vput( struct vnode *vp) {
if( (vp->v_flag & VVMIO) && vp->v_vmdata) {
vput( vp);
vm_object_deallocate( (vm_object_t) vp->v_vmdata);
} else {
vput( vp);
}
vput( vp);
return 0;
}
int
nfsrv_vrele( struct vnode *vp) {
if( (vp->v_flag & VVMIO) && vp->v_vmdata) {
vrele( vp);
vm_object_deallocate( (vm_object_t) vp->v_vmdata);
} else {
vrele( vp);
}
vrele( vp);
return 0;
}

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.3 (Berkeley) 1/4/94
* $Id: nfs_subs.c,v 1.7 1994/10/17 17:47:37 phk Exp $
* $Id: nfs_subs.c,v 1.8 1995/01/09 16:05:08 davidg Exp $
*/
/*
@ -1207,17 +1207,20 @@ nfsrv_vmio( struct vnode *vp) {
int
nfsrv_vput( struct vnode *vp) {
if( (vp->v_flag & VVMIO) && vp->v_vmdata) {
vput( vp);
vm_object_deallocate( (vm_object_t) vp->v_vmdata);
} else {
vput( vp);
}
vput( vp);
return 0;
}
int
nfsrv_vrele( struct vnode *vp) {
if( (vp->v_flag & VVMIO) && vp->v_vmdata) {
vrele( vp);
vm_object_deallocate( (vm_object_t) vp->v_vmdata);
} else {
vrele( vp);
}
vrele( vp);
return 0;
}