diff options
author | dfr <dfr@FreeBSD.org> | 2007-07-09 09:03:49 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2007-07-09 09:03:49 +0000 |
commit | 4cd173a329dbe3f4d052194878a5a7c266bd9173 (patch) | |
tree | f0b8130e3a8c36c6f58b8e26b4fa901f0e10afa4 /sys/cddl | |
parent | 5304fdd902cbcb437688a4d899bc17db4ead1bcc (diff) | |
download | FreeBSD-src-4cd173a329dbe3f4d052194878a5a7c266bd9173.zip FreeBSD-src-4cd173a329dbe3f4d052194878a5a7c266bd9173.tar.gz |
Correct a reference-counting mistake in the ZFS code which led to abnormal
memory usage and pessimal cache performance.
Reviewed by: pjd
Approved by: re (rwatson)
Diffstat (limited to 'sys/cddl')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c | 2 | ||||
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c index 20643f5..7ed9c5f 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c @@ -3493,7 +3493,7 @@ zfs_freebsd_reclaim(ap) rele = 0; vp->v_data = NULL; ASSERT(vp->v_holdcnt > 1); - vdropl(vp); + VI_UNLOCK(vp); if (!zp->z_unlinked && rele) VFS_RELE(zfsvfs->z_vfs); return (0); diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c index 635c2c9..329928d 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c @@ -115,7 +115,6 @@ zfs_znode_cache_constructor(void *buf, void *cdrarg, int kmflags) ASSERT(error == 0); zp->z_vnode = vp; vp->v_data = (caddr_t)zp; - vhold(vp); vp->v_vnlock->lk_flags |= LK_CANRECURSE; vp->v_vnlock->lk_flags &= ~LK_NOSHARE; } else { @@ -601,7 +600,6 @@ zfs_zget(zfsvfs_t *zfsvfs, uint64_t obj_num, znode_t **zpp) ASSERT(err == 0); vp = ZTOV(zp); vp->v_data = (caddr_t)zp; - vhold(vp); vp->v_vnlock->lk_flags |= LK_CANRECURSE; vp->v_vnlock->lk_flags &= ~LK_NOSHARE; vp->v_type = IFTOVT((mode_t)zp->z_phys->zp_mode); |