From fed604c8446aa69c17c11c9a07e81a51ebd09f44 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 19 Mar 2009 21:18:54 -0700 Subject: [PATCH 1/2] Add extra () requested by gcc --- module/zfs/dmu_tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zfs/dmu_tx.c b/module/zfs/dmu_tx.c index 0af089198c..a9bc1e6ac1 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)); From 63781842e3f1c2db29f6b5617649765314ec48ec Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 19 Mar 2009 21:21:35 -0700 Subject: [PATCH 2/2] Update mutex_lock to pthread_mutex_lock for zcl->zcl_callback_locks. --- cmd/ztest/ztest.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c index 659e92045b..59eff65a3f 100644 --- a/cmd/ztest/ztest.c +++ b/cmd/ztest/ztest.c @@ -2496,9 +2496,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)); @@ -2595,7 +2595,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 @@ -2640,7 +2640,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); }