- Use vrefcnt() instead of v_usecount.
This commit is contained in:
parent
65328ea561
commit
76a1e2b647
@ -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;
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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.
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user