summaryrefslogtreecommitdiffstats
path: root/module/zfs/dmu_object.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/zfs/dmu_object.c')
-rw-r--r--module/zfs/dmu_object.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/module/zfs/dmu_object.c b/module/zfs/dmu_object.c
index e54043fc3..488ca2155 100644
--- a/module/zfs/dmu_object.c
+++ b/module/zfs/dmu_object.c
@@ -129,11 +129,11 @@ dmu_object_alloc_dnsize(objset_t *os, dmu_object_type_t ot, int blocksize,
}
dnode_allocate(dn, ot, blocksize, 0, bonustype, bonuslen, dn_slots, tx);
- dnode_rele(dn, FTAG);
-
mutex_exit(&os->os_obj_lock);
- dmu_tx_add_new_object(tx, os, object);
+ dmu_tx_add_new_object(tx, os, dn);
+ dnode_rele(dn, FTAG);
+
return (object);
}
@@ -168,9 +168,10 @@ dmu_object_claim_dnsize(objset_t *os, uint64_t object, dmu_object_type_t ot,
return (err);
dnode_allocate(dn, ot, blocksize, 0, bonustype, bonuslen, dn_slots, tx);
+ dmu_tx_add_new_object(tx, os, dn);
+
dnode_rele(dn, FTAG);
- dmu_tx_add_new_object(tx, os, object);
return (0);
}