]> granicus.if.org Git - zfs/commitdiff
Fix rw_init() usage
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 26 Aug 2010 17:30:13 +0000 (10:30 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 31 Aug 2010 15:38:46 +0000 (08:38 -0700)
Properly initialize rwlock primitives.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
module/zfs/dsl_dataset.c
module/zfs/zap.c
module/zfs/zap_micro.c

index f6f198791797b1c288e131a384b5429f20343cae..4edf34244711923e5250a1cbccba5a24669366c1 100644 (file)
@@ -398,7 +398,7 @@ dsl_dataset_get_ref(dsl_pool_t *dp, uint64_t dsobj, void *tag,
                mutex_init(&ds->ds_lock, NULL, MUTEX_DEFAULT, NULL);
                mutex_init(&ds->ds_recvlock, NULL, MUTEX_DEFAULT, NULL);
                mutex_init(&ds->ds_opening_lock, NULL, MUTEX_DEFAULT, NULL);
-               rw_init(&ds->ds_rwlock, 0, 0, 0);
+               rw_init(&ds->ds_rwlock, NULL, RW_DEFAULT, NULL);
                cv_init(&ds->ds_exclusive_cv, NULL, CV_DEFAULT, NULL);
 
                bplist_create(&ds->ds_pending_deadlist);
index 89446a4fbdfc2e1e8dcc28e6702bc924f637f31b..fa7e61711af02b2d05ee6c87fd5a7d099ba20b55 100644 (file)
@@ -394,7 +394,7 @@ zap_create_leaf(zap_t *zap, dmu_tx_t *tx)
 
        ASSERT(RW_WRITE_HELD(&zap->zap_rwlock));
 
-       rw_init(&l->l_rwlock, 0, 0, 0);
+       rw_init(&l->l_rwlock, NULL, RW_DEFAULT, NULL);
        rw_enter(&l->l_rwlock, RW_WRITER);
        l->l_blkid = zap_allocate_blocks(zap, 1);
        l->l_dbuf = NULL;
@@ -453,7 +453,7 @@ zap_open_leaf(uint64_t blkid, dmu_buf_t *db)
        ASSERT(blkid != 0);
 
        l = kmem_alloc(sizeof (zap_leaf_t), KM_SLEEP);
-       rw_init(&l->l_rwlock, 0, 0, 0);
+       rw_init(&l->l_rwlock, NULL, RW_DEFAULT, NULL);
        rw_enter(&l->l_rwlock, RW_WRITER);
        l->l_blkid = blkid;
        l->l_bs = highbit(db->db_size)-1;
index 7627504a990eeddfd10109fc579256ab0c9448f9..aa86bdecb11e2fc2d9bfbdf4879af4dc6cb8dabf 100644 (file)
@@ -365,7 +365,7 @@ mzap_open(objset_t *os, uint64_t obj, dmu_buf_t *db)
        ASSERT3U(MZAP_ENT_LEN, ==, sizeof (mzap_ent_phys_t));
 
        zap = kmem_zalloc(sizeof (zap_t), KM_SLEEP);
-       rw_init(&zap->zap_rwlock, 0, 0, 0);
+       rw_init(&zap->zap_rwlock, NULL, RW_DEFAULT, NULL);
        rw_enter(&zap->zap_rwlock, RW_WRITER);
        zap->zap_objset = os;
        zap->zap_object = obj;