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/ntfs | |
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/ntfs')
-rw-r--r-- | sys/fs/ntfs/ntfs_vfsops.c | 2 | ||||
-rw-r--r-- | sys/fs/ntfs/ntfs_vnops.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c index 1f3ba62..e91791a 100644 --- a/sys/fs/ntfs/ntfs_vfsops.c +++ b/sys/fs/ntfs/ntfs_vfsops.c @@ -488,7 +488,7 @@ ntfs_unmount( /* Check if only system vnodes are rest */ for(i=0;i<NTFS_SYSNODESNUM;i++) if((ntmp->ntm_sysvn[i]) && - (ntmp->ntm_sysvn[i]->v_usecount > 1)) return (EBUSY); + (vrefcnt(ntmp->ntm_sysvn[i]) > 1)) return (EBUSY); /* Dereference all system vnodes */ for(i=0;i<NTFS_SYSNODESNUM;i++) diff --git a/sys/fs/ntfs/ntfs_vnops.c b/sys/fs/ntfs/ntfs_vnops.c index fc46617..d46b88b 100644 --- a/sys/fs/ntfs/ntfs_vnops.c +++ b/sys/fs/ntfs/ntfs_vnops.c @@ -196,7 +196,7 @@ ntfs_inactive(ap) dprintf(("ntfs_inactive: vnode: %p, ntnode: %d\n", vp, ip->i_number)); - if (ntfs_prtactive && vp->v_usecount != 0) + if (ntfs_prtactive && vrefcnt(vp) != 0) vprint("ntfs_inactive: pushing active", vp); VOP_UNLOCK(vp, 0, ap->a_td); @@ -223,7 +223,7 @@ ntfs_reclaim(ap) dprintf(("ntfs_reclaim: vnode: %p, ntnode: %d\n", vp, ip->i_number)); - if (ntfs_prtactive && vp->v_usecount != 0) + if (ntfs_prtactive && vrefcnt(vp) != 0) vprint("ntfs_reclaim: pushing active", vp); if ((error = ntfs_ntget(ip)) != 0) |