mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-24 02:34:59 +00:00
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:
parent
30ad8d9349
commit
081129c5e3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6210
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue