Since the addition of the VI_DOINGINACT flag some time ago,

VOP_INACTIVE routines need not worry about their vnode getting
recycled if they block. Remove the code from nfs_inactive() that
used vget() to get an extra vnode reference that was held during
the nfs_vinvalbuf() call.
This commit is contained in:
Ian Dowse 2003-10-05 12:41:35 +00:00
parent 5d264f84f3
commit d94f8c66b8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=120812

View File

@ -291,21 +291,7 @@ nfs_inactive(struct vop_inactive_args *ap)
} else
sp = NULL;
if (sp) {
/*
* We need a reference to keep the vnode from being
* recycled by getnewvnode while we do the I/O
* associated with discarding the buffers unless we
* are being forcibly unmounted in which case we already
* have our own reference.
*/
if (vrefcnt(ap->a_vp) > 0)
(void) nfs_vinvalbuf(ap->a_vp, 0, sp->s_cred, td, 1);
else if (vget(ap->a_vp, 0, td))
panic("nfs_inactive: lost vnode");
else {
(void) nfs_vinvalbuf(ap->a_vp, 0, sp->s_cred, td, 1);
vrele(ap->a_vp);
}
(void)nfs_vinvalbuf(ap->a_vp, 0, sp->s_cred, td, 1);
/*
* Remove the silly file that was rename'd earlier
*/