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:
parent
5d264f84f3
commit
d94f8c66b8
@ -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
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user