Fix lock leak leading to the 'System call <name> returning with 1 locks held'
panic. Reported by: kris Approved by: re (kensmith)
This commit is contained in:
parent
3543c1b429
commit
e8bd23b460
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=172443
@ -209,6 +209,8 @@ 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));
|
||||
|
@ -209,6 +209,8 @@ 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));
|
||||
|
Loading…
Reference in New Issue
Block a user