Skip to content

Commit 2b56db3

Browse files
author
Tom Caputi
committed
Fix ASSERT in dmu_free_long_object_raw()
This small patch fixes an issue where dmu_free_long_object_raw() calls dnode_hold() after freeing the dnode a line above. Signed-off-by: Tom Caputi <tcaputi@datto.com>
1 parent 21a932b commit 2b56db3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

module/zfs/dmu.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -932,9 +932,10 @@ dmu_free_long_object_impl(objset_t *os, uint64_t object, boolean_t raw)
932932
dmu_tx_mark_netfree(tx);
933933
err = dmu_tx_assign(tx, TXG_WAIT);
934934
if (err == 0) {
935-
err = dmu_object_free(os, object, tx);
936-
if (err == 0 && raw)
937-
VERIFY0(dmu_object_dirty_raw(os, object, tx));
935+
if (raw)
936+
err = dmu_object_dirty_raw(os, object, tx);
937+
if (err == 0)
938+
err = dmu_object_free(os, object, tx);
938939

939940
dmu_tx_commit(tx);
940941
} else {

0 commit comments

Comments
 (0)