diff options
author | jeff <jeff@FreeBSD.org> | 2002-09-25 02:32:42 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2002-09-25 02:32:42 +0000 |
commit | f7e588347b3192f4351b4e27c498cc085021b6e4 (patch) | |
tree | 8197cc22dc1ce7991152741f8cdeab9111066188 /sys/fs/nwfs/nwfs_node.c | |
parent | 55a297392dfe0205c2d76aca3bd3de47ea4877b3 (diff) | |
download | FreeBSD-src-f7e588347b3192f4351b4e27c498cc085021b6e4.zip FreeBSD-src-f7e588347b3192f4351b4e27c498cc085021b6e4.tar.gz |
- Use vrefcnt() where it is safe to do so instead of doing direct and
unlocked accesses to v_usecount.
- Lock access to the buf lists in the various sync routines. interlock
locking could be avoided almost entirely in leaf filesystems if the
fsync function had a generic helper.
Diffstat (limited to 'sys/fs/nwfs/nwfs_node.c')
-rw-r--r-- | sys/fs/nwfs/nwfs_node.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/fs/nwfs/nwfs_node.c b/sys/fs/nwfs/nwfs_node.c index 7a85d55..1d599fc 100644 --- a/sys/fs/nwfs/nwfs_node.c +++ b/sys/fs/nwfs/nwfs_node.c @@ -103,8 +103,8 @@ nwfs_sysctl_vnprint(SYSCTL_HANDLER_ARGS) { LIST_FOREACH(np, nhpp, n_hash) { vp = NWTOV(np); vprint(NULL, vp); - printf("%s:%d:%d:%d:%d\n",np->n_name,vp->v_usecount,vp->v_holdcnt, - np->n_fid.f_id, np->n_fid.f_parent); + printf("%s:%d:%d:%d:%d\n",np->n_name,vrefcnt(vp), + vp->v_holdcnt,np->n_fid.f_id, np->n_fid.f_parent); } } return 0; @@ -256,7 +256,7 @@ nwfs_reclaim(ap) struct nwmount *nmp = VTONWFS(vp); struct thread *td = ap->a_td; - NCPVNDEBUG("%s,%d\n", np->n_name, vp->v_usecount); + NCPVNDEBUG("%s,%d\n", np->n_name, vrefcnt(vp)); if (np->n_flag & NREFPARENT) { np->n_flag &= ~NREFPARENT; if (nwfs_lookupnp(nmp, np->n_parent, td, &dnp) == 0) { @@ -293,7 +293,7 @@ nwfs_inactive(ap) struct nwnode *np = VTONW(vp); int error; - NCPVNDEBUG("%s: %d\n", VTONW(vp)->n_name, vp->v_usecount); + NCPVNDEBUG("%s: %d\n", VTONW(vp)->n_name, vrefcnt(vp)); if (np->opened) { error = nwfs_vinvalbuf(vp, V_SAVE, cred, td, 1); error = ncp_close_file(NWFSTOCONN(VTONWFS(vp)), &np->n_fh, td, cred); |