diff options
author | delphij <delphij@FreeBSD.org> | 2010-01-02 23:38:03 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2010-01-02 23:38:03 +0000 |
commit | 682c0944eb643a64db9c9279bfd17d6767a6bd3d (patch) | |
tree | 3236a5a7eb7af99b90cc73dda09096d8a17b861a /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c | |
parent | a922794e92f1d71cc8cce3b0a28fb257186744f8 (diff) | |
download | FreeBSD-src-682c0944eb643a64db9c9279bfd17d6767a6bd3d.zip FreeBSD-src-682c0944eb643a64db9c9279bfd17d6767a6bd3d.tar.gz |
Reduce diff against OpenSolaris - move Giant acquire/release to
zfs_znode.c. As a side effect this also eliminates two potential
Giant leaks.
Approved by: pjd
MFC after: 1 month
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 7157930..900087b 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 @@ -1017,6 +1017,7 @@ zfs_zinactive(znode_t *zp) vnode_t *vp = ZTOV(zp); zfsvfs_t *zfsvfs = zp->z_zfsvfs; uint64_t z_id = zp->z_id; + int vfslocked; ASSERT(zp->z_dbuf && zp->z_phys); @@ -1049,7 +1050,9 @@ zfs_zinactive(znode_t *zp) ZFS_OBJ_HOLD_EXIT(zfsvfs, z_id); ASSERT(vp->v_count == 0); vrecycle(vp, curthread); + vfslocked = VFS_LOCK_GIANT(zfsvfs->z_vfs); zfs_rmnode(zp); + VFS_UNLOCK_GIANT(vfslocked); return; } mutex_exit(&zp->z_lock); |