diff options
author | gw25295 <none@none> | 2007-08-08 15:35:58 -0700 |
---|---|---|
committer | gw25295 <none@none> | 2007-08-08 15:35:58 -0700 |
commit | c25056de36a33f2a76f79dcf64593f731d258013 (patch) | |
tree | 29406bc39e21ecff22376a2c18f4dd9ea0b51dd2 /usr/src/uts/common/fs/zfs/zap_micro.c | |
parent | 74ed3e963b20ba6344270ca5163d3cfb1565c0c6 (diff) | |
download | illumos-gate-c25056de36a33f2a76f79dcf64593f731d258013.tar.gz |
6584470 zdb needs to initialize the bpl_lock mutex
6583739 libzpool should check for properly initialized mutexes
6548010 unbalanced mutex_init/mutex_destroy issues in zfs
6502263 ZFS needs some more FreeBSD porting love
Contributed by Pawel Dawidek
6576827 multiple calls to spa_activate() can end up reinitializing all its mutexes
6576830 certain spa mutexes and condition variables need some love
Diffstat (limited to 'usr/src/uts/common/fs/zfs/zap_micro.c')
-rw-r--r-- | usr/src/uts/common/fs/zfs/zap_micro.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr/src/uts/common/fs/zfs/zap_micro.c b/usr/src/uts/common/fs/zfs/zap_micro.c index 1c85e689f0..8fce0ba400 100644 --- a/usr/src/uts/common/fs/zfs/zap_micro.c +++ b/usr/src/uts/common/fs/zfs/zap_micro.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -208,6 +208,10 @@ mzap_open(objset_t *os, uint64_t obj, dmu_buf_t *db) winner = dmu_buf_set_user(db, zap, &zap->zap_m.zap_phys, zap_evict); if (winner != NULL) { + rw_exit(&zap->zap_rwlock); + rw_destroy(&zap->zap_rwlock); + if (!zap->zap_ismicro) + mutex_destroy(&zap->zap_f.zap_num_entries_mtx); kmem_free(zap, sizeof (zap_t)); return (winner); } @@ -465,6 +469,8 @@ zap_evict(dmu_buf_t *db, void *vzap) if (zap->zap_ismicro) mze_destroy(zap); + else + mutex_destroy(&zap->zap_f.zap_num_entries_mtx); kmem_free(zap, sizeof (zap_t)); } |