Skip to content

Commit

Permalink
Fix ASSERT in dmu_free_long_object_raw()
Browse files Browse the repository at this point in the history
This small patch fixes an issue where dmu_free_long_object_raw()
calls dnode_hold() after freeing the dnode a line above.

Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes openzfs#6766
  • Loading branch information
Tom Caputi authored and Nasf-Fan committed Nov 6, 2017
1 parent bde46a3 commit eae1990
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions module/zfs/dmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -932,9 +932,10 @@ dmu_free_long_object_impl(objset_t *os, uint64_t object, boolean_t raw)
dmu_tx_mark_netfree(tx);
err = dmu_tx_assign(tx, TXG_WAIT);
if (err == 0) {
err = dmu_object_free(os, object, tx);
if (err == 0 && raw)
VERIFY0(dmu_object_dirty_raw(os, object, tx));
if (raw)
err = dmu_object_dirty_raw(os, object, tx);
if (err == 0)
err = dmu_object_free(os, object, tx);

dmu_tx_commit(tx);
} else {
Expand Down

0 comments on commit eae1990

Please sign in to comment.