diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c index 07606c2f1a..22849240b9 100644 --- a/cmd/ztest/ztest.c +++ b/cmd/ztest/ztest.c @@ -2498,9 +2498,9 @@ ztest_commit_callback(void *arg, int error) ASSERT3U(data->zcd_txg, !=, 0); /* Remove our callback from the list */ - (void) mutex_lock(&zcl->zcl_callbacks_lock); + (void) pthread_mutex_lock(&zcl->zcl_callbacks_lock); list_remove(&zcl->zcl_callbacks, data); - (void) mutex_unlock(&zcl->zcl_callbacks_lock); + (void) pthread_mutex_unlock(&zcl->zcl_callbacks_lock); out: umem_free(data, sizeof (ztest_cb_data_t)); @@ -2597,7 +2597,7 @@ ztest_dmu_commit_callbacks(ztest_args_t *za) dmu_write(os, ZTEST_DIROBJ, za->za_diroff, sizeof (uint64_t), &txg, tx); - (void) mutex_lock(&zcl->zcl_callbacks_lock); + (void) pthread_mutex_lock(&zcl->zcl_callbacks_lock); /* * Since commit callbacks don't have any ordering requirement and since @@ -2642,7 +2642,7 @@ ztest_dmu_commit_callbacks(ztest_args_t *za) tmp_cb = cb_data[i]; } - (void) mutex_unlock(&zcl->zcl_callbacks_lock); + (void) pthread_mutex_unlock(&zcl->zcl_callbacks_lock); dmu_tx_commit(tx); } diff --git a/module/zfs/dmu_tx.c b/module/zfs/dmu_tx.c index a9783a9717..fb34930ea9 100644 --- a/module/zfs/dmu_tx.c +++ b/module/zfs/dmu_tx.c @@ -1103,7 +1103,7 @@ dmu_tx_callback(list_t *cb_list, int error) { dmu_tx_callback_t *dcb; - while (dcb = list_head(cb_list)) { + while ((dcb = list_head(cb_list))) { list_remove(cb_list, dcb); dcb->dcb_func(dcb->dcb_data, error); kmem_free(dcb, sizeof (dmu_tx_callback_t));