diff options
author | iedowse <iedowse@FreeBSD.org> | 2003-10-05 12:41:35 +0000 |
---|---|---|
committer | iedowse <iedowse@FreeBSD.org> | 2003-10-05 12:41:35 +0000 |
commit | 4357db17b4e88f652c06efbed73ab1be6b97df3e (patch) | |
tree | ae0715ae00f9ca856b02e6fd5d4b68051c5bbe05 /sys/nfsclient/nfs_node.c | |
parent | 3a1ffe0880ab7c410bd5817953a1243d6493811b (diff) | |
download | FreeBSD-src-4357db17b4e88f652c06efbed73ab1be6b97df3e.zip FreeBSD-src-4357db17b4e88f652c06efbed73ab1be6b97df3e.tar.gz |
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.
Diffstat (limited to 'sys/nfsclient/nfs_node.c')
-rw-r--r-- | sys/nfsclient/nfs_node.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/sys/nfsclient/nfs_node.c b/sys/nfsclient/nfs_node.c index 31ea929..fc3520f 100644 --- a/sys/nfsclient/nfs_node.c +++ b/sys/nfsclient/nfs_node.c @@ -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 */ |