diff options
author | jeff <jeff@FreeBSD.org> | 2002-09-25 02:38:43 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2002-09-25 02:38:43 +0000 |
commit | 5c7f8a426d77fd9157454ef8c03ad4298759b909 (patch) | |
tree | 92aceb1e68b4986cdcf026c3e92a8d9144c2ce36 /sys/nfsclient/nfs_node.c | |
parent | 906daccf7224474d155117b8c9b209624ea6ec01 (diff) | |
download | FreeBSD-src-5c7f8a426d77fd9157454ef8c03ad4298759b909.zip FreeBSD-src-5c7f8a426d77fd9157454ef8c03ad4298759b909.tar.gz |
- Lock access to the buf lists.
- Use vrefcnt() where appropriate.
- Add some locking asserts.
Diffstat (limited to 'sys/nfsclient/nfs_node.c')
-rw-r--r-- | sys/nfsclient/nfs_node.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/nfsclient/nfs_node.c b/sys/nfsclient/nfs_node.c index 90ef7aa..34729a3 100644 --- a/sys/nfsclient/nfs_node.c +++ b/sys/nfsclient/nfs_node.c @@ -281,7 +281,7 @@ nfs_inactive(struct vop_inactive_args *ap) struct thread *td = curthread; /* XXX */ np = VTONFS(ap->a_vp); - if (prtactive && ap->a_vp->v_usecount != 0) + if (prtactive && vrefcnt(ap->a_vp) != 0) vprint("nfs_inactive: pushing active", ap->a_vp); if (ap->a_vp->v_type != VDIR) { sp = np->n_sillyrename; @@ -296,7 +296,7 @@ nfs_inactive(struct vop_inactive_args *ap) * are being forcibly unmounted in which case we already * have our own reference. */ - if (ap->a_vp->v_usecount > 0) + 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"); @@ -327,7 +327,7 @@ nfs_reclaim(struct vop_reclaim_args *ap) struct nfsnode *np = VTONFS(vp); struct nfsdmap *dp, *dp2; - if (prtactive && vp->v_usecount != 0) + if (prtactive && vrefcnt(vp) != 0) vprint("nfs_reclaim: pushing active", vp); if (np->n_hash.le_prev != NULL) /* XXX beware */ |