Merge commit 'refs/top-bases/linux-unused' into linux-unused

This commit is contained in:
Brian Behlendorf 2009-03-19 21:32:15 -07:00
commit 19faf7f113
2 changed files with 5 additions and 5 deletions

View File

@ -2498,9 +2498,9 @@ ztest_commit_callback(void *arg, int error)
ASSERT3U(data->zcd_txg, !=, 0); ASSERT3U(data->zcd_txg, !=, 0);
/* Remove our callback from the list */ /* 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); list_remove(&zcl->zcl_callbacks, data);
(void) mutex_unlock(&zcl->zcl_callbacks_lock); (void) pthread_mutex_unlock(&zcl->zcl_callbacks_lock);
out: out:
umem_free(data, sizeof (ztest_cb_data_t)); 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); 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 * 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]; tmp_cb = cb_data[i];
} }
(void) mutex_unlock(&zcl->zcl_callbacks_lock); (void) pthread_mutex_unlock(&zcl->zcl_callbacks_lock);
dmu_tx_commit(tx); dmu_tx_commit(tx);
} }

View File

@ -1103,7 +1103,7 @@ dmu_tx_callback(list_t *cb_list, int error)
{ {
dmu_tx_callback_t *dcb; dmu_tx_callback_t *dcb;
while (dcb = list_head(cb_list)) { while ((dcb = list_head(cb_list))) {
list_remove(cb_list, dcb); list_remove(cb_list, dcb);
dcb->dcb_func(dcb->dcb_data, error); dcb->dcb_func(dcb->dcb_data, error);
kmem_free(dcb, sizeof (dmu_tx_callback_t)); kmem_free(dcb, sizeof (dmu_tx_callback_t));