- Use vrefcnt() instead of v_usecount.

This commit is contained in:
Jeff Roberson 2002-09-25 02:42:43 +00:00
parent 0fa89fc7d9
commit 37ab0e0d81
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=103942
5 changed files with 10 additions and 10 deletions

View File

@ -1605,7 +1605,7 @@ ccdlookup(char *path, struct thread *td, struct vnode **vpp)
}
vp = nd.ni_vp;
if (vp->v_usecount > 1) {
if (vrefcnt(vp) > 1) {
error = EBUSY;
goto bad;
}

View File

@ -182,7 +182,7 @@ cd9660_inactive(ap)
register struct iso_node *ip = VTOI(vp);
int error = 0;
if (prtactive && vp->v_usecount != 0)
if (prtactive && vrefcnt(vp) != 0)
vprint("cd9660_inactive: pushing active", vp);
ip->i_flag = 0;
@ -209,7 +209,7 @@ cd9660_reclaim(ap)
register struct vnode *vp = ap->a_vp;
register struct iso_node *ip = VTOI(vp);
if (prtactive && vp->v_usecount != 0)
if (prtactive && vrefcnt(vp) != 0)
vprint("cd9660_reclaim: pushing active", vp);
/*
* Remove the inode from its hash chain.

View File

@ -1605,7 +1605,7 @@ ccdlookup(char *path, struct thread *td, struct vnode **vpp)
}
vp = nd.ni_vp;
if (vp->v_usecount > 1) {
if (vrefcnt(vp) > 1) {
error = EBUSY;
goto bad;
}

View File

@ -182,7 +182,7 @@ cd9660_inactive(ap)
register struct iso_node *ip = VTOI(vp);
int error = 0;
if (prtactive && vp->v_usecount != 0)
if (prtactive && vrefcnt(vp) != 0)
vprint("cd9660_inactive: pushing active", vp);
ip->i_flag = 0;
@ -209,7 +209,7 @@ cd9660_reclaim(ap)
register struct vnode *vp = ap->a_vp;
register struct iso_node *ip = VTOI(vp);
if (prtactive && vp->v_usecount != 0)
if (prtactive && vrefcnt(vp) != 0)
vprint("cd9660_reclaim: pushing active", vp);
/*
* Remove the inode from its hash chain.

View File

@ -114,7 +114,7 @@ lomacfs_inactive(
const char *name = "[unknown]";
#endif
printf("lomacfs: inactive(%p \"%s\"), lvp usecount down to %u\n",
vp, name, lvp->v_usecount);
vp, name, vrefcnt(lvp));
} while (0);
#endif
/*
@ -124,7 +124,7 @@ lomacfs_inactive(
* Additionally, devices should be totally freed
* on last close, not lazily.
*/
if (lvp->v_usecount == 0 &&
if (vrefcnt(lvp) == 0 &&
(lvp->v_type != VREG && lvp->v_type != VDIR)) {
vdrop(lvp);
VTOLVP(vp) = NULL;
@ -155,7 +155,7 @@ lomacfs_reclaim(
const char *name = "[unknown]";
#endif
printf("lomacfs: reclaim(%p \"%s\"), lvp usecount down to %u\n",
vp, name, lvp->v_usecount);
vp, name, vrefcnt(lvp));
}
#endif
if (lvp != NULL)
@ -298,7 +298,7 @@ lomacfs_lookup(
const char *name = "[unknown]";
#endif
printf("lomacfs: lookup(%p \"%s\"), lvp usecount up to %u\n",
vp, name, VTOLVP(vp)->v_usecount);
vp, name, vrefcnt(VTOLVP(vp)));
}
#endif
return (error);