--- a/usr/src/uts/common/fs/zfs/dmu_objset.c Mon Jun 22 22:44:27 2009 -0600
+++ b/usr/src/uts/common/fs/zfs/dmu_objset.c Mon Jun 22 23:07:46 2009 -0700
@@ -1130,7 +1130,7 @@
*/
for (obj = 0; err == 0; err = dmu_object_next(os, &obj, FALSE, 0)) {
- dmu_tx_t *tx = dmu_tx_create(os);
+ dmu_tx_t *tx;
dmu_buf_t *db;
int objerr;
@@ -1140,6 +1140,7 @@
objerr = dmu_bonus_hold(os, obj, FTAG, &db);
if (objerr)
continue;
+ tx = dmu_tx_create(os);
dmu_tx_hold_bonus(tx, obj);
objerr = dmu_tx_assign(tx, TXG_WAIT);
if (objerr) {