summaryrefslogtreecommitdiffstats
path: root/sys/gnu/ext2fs/ext2_inode.c
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2002-09-25 02:34:56 +0000
committerjeff <jeff@FreeBSD.org>2002-09-25 02:34:56 +0000
commit906daccf7224474d155117b8c9b209624ea6ec01 (patch)
treed6e06f11cbe3b76a4f2dcec91b3d5527d5601240 /sys/gnu/ext2fs/ext2_inode.c
parentd168f755f99bb0772204d5a6106672c073805d5d (diff)
downloadFreeBSD-src-906daccf7224474d155117b8c9b209624ea6ec01.zip
FreeBSD-src-906daccf7224474d155117b8c9b209624ea6ec01.tar.gz
- Lock access to the buf lists.
- Use vrefcnt() where appropriate.
Diffstat (limited to 'sys/gnu/ext2fs/ext2_inode.c')
-rw-r--r--sys/gnu/ext2fs/ext2_inode.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/gnu/ext2fs/ext2_inode.c b/sys/gnu/ext2fs/ext2_inode.c
index d5e6ada..a96dc67 100644
--- a/sys/gnu/ext2fs/ext2_inode.c
+++ b/sys/gnu/ext2fs/ext2_inode.c
@@ -331,9 +331,11 @@ done:
for (i = 0; i < NDADDR; i++)
if (newblks[i] != oip->i_db[i])
panic("itrunc2");
+ VI_LOCK(ovp);
if (length == 0 && (!TAILQ_EMPTY(&ovp->v_dirtyblkhd) ||
!TAILQ_EMPTY(&ovp->v_cleanblkhd)))
panic("itrunc3");
+ VI_UNLOCK(ovp);
#endif /* DIAGNOSTIC */
/*
* Put back the real size.
@@ -475,7 +477,7 @@ ext2_inactive(ap)
int mode, error = 0;
ext2_discard_prealloc(ip);
- if (prtactive && vp->v_usecount != 0)
+ if (prtactive && vrefcnt(vp) != 0)
vprint("ext2_inactive: pushing active", vp);
/*
@@ -525,7 +527,7 @@ ext2_reclaim(ap)
struct inode *ip;
struct vnode *vp = ap->a_vp;
- if (prtactive && vp->v_usecount != 0)
+ if (prtactive && vrefcnt(vp) != 0)
vprint("ufs_reclaim: pushing active", vp);
ip = VTOI(vp);
if (ip->i_flag & IN_LAZYMOD) {
OpenPOWER on IntegriCloud