Mercurial > illumos > illumos-gate
diff usr/src/uts/common/fs/zfs/dsl_dataset.c @ 2856:6f4d5ee1906a
6463348 ZFS code could be more portable
author | nd150628 |
---|---|
date | Tue, 03 Oct 2006 15:01:10 -0700 |
parents | 752725c22841 |
children | c0259887ebbc |
line wrap: on
line diff
--- a/usr/src/uts/common/fs/zfs/dsl_dataset.c Tue Oct 03 14:50:02 2006 -0700 +++ b/usr/src/uts/common/fs/zfs/dsl_dataset.c Tue Oct 03 15:01:10 2006 -0700 @@ -231,6 +231,9 @@ if (list_link_active(&ds->ds_synced_link)) list_remove(&dp->dp_synced_objsets, ds); + mutex_destroy(&ds->ds_lock); + mutex_destroy(&ds->ds_deadlist.bpl_lock); + kmem_free(ds, sizeof (dsl_dataset_t)); } @@ -284,6 +287,10 @@ ds->ds_object = dsobj; ds->ds_phys = dbuf->db_data; + mutex_init(&ds->ds_lock, NULL, MUTEX_DEFAULT, NULL); + mutex_init(&ds->ds_deadlist.bpl_lock, NULL, MUTEX_DEFAULT, + NULL); + err = bplist_open(&ds->ds_deadlist, mos, ds->ds_phys->ds_deadlist_obj); if (err == 0) { @@ -295,6 +302,8 @@ * we don't really need to close the blist if we * just opened it. */ + mutex_destroy(&ds->ds_lock); + mutex_destroy(&ds->ds_deadlist.bpl_lock); kmem_free(ds, sizeof (dsl_dataset_t)); dmu_buf_rele(dbuf, tag); return (err); @@ -343,6 +352,8 @@ DS_MODE_NONE, ds); } dsl_dir_close(ds->ds_dir, ds); + mutex_destroy(&ds->ds_lock); + mutex_destroy(&ds->ds_deadlist.bpl_lock); kmem_free(ds, sizeof (dsl_dataset_t)); if (err) { dmu_buf_rele(dbuf, tag);