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/nullfs | |
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/nullfs')
-rw-r--r-- | sys/fs/nullfs/null_subr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/fs/nullfs/null_subr.c b/sys/fs/nullfs/null_subr.c index fd8d9be..1fdd210 100644 --- a/sys/fs/nullfs/null_subr.c +++ b/sys/fs/nullfs/null_subr.c @@ -321,7 +321,7 @@ null_checkvp(vp, fil, lno) while (null_checkvp_barrier) /*WAIT*/ ; panic("null_checkvp"); } - if (a->null_lowervp->v_usecount < 1) { + if (vrefcnt(a->null_lowervp) < 1) { int i; u_long *p; printf("vp = %p, unref'ed lowervp\n", (void *)vp); for (p = (u_long *) a, i = 0; i < 8; i++) @@ -333,8 +333,8 @@ null_checkvp(vp, fil, lno) }; #ifdef notyet printf("null %x/%d -> %x/%d [%s, %d]\n", - NULLTOV(a), NULLTOV(a)->v_usecount, - a->null_lowervp, a->null_lowervp->v_usecount, + NULLTOV(a), vrefcnt(NULLTOV(a)), + a->null_lowervp, vrefcnt(a->null_lowervp), fil, lno); #endif return a->null_lowervp; |