Skip to content

Commit

Permalink
Revert "Cleanup: Delete dead code from send_merge_thread()"
Browse files Browse the repository at this point in the history
This reverts commit fb823de due to a regression.  It is in fact possible
for the range->eos_marker to be false on error.

Reviewed-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #14042
Closes #14104
  • Loading branch information
behlendorf authored Oct 28, 2022
1 parent 5f0a48c commit 82ad2a0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions module/zfs/dmu_send.c
Original file line number Diff line number Diff line change
Expand Up @@ -1586,8 +1586,9 @@ send_merge_thread(void *arg)
}
range_free(front_ranges[i]);
}
ASSERT3P(range, !=, NULL);
ASSERT3S(range->eos_marker, ==, B_TRUE);
if (range == NULL)
range = kmem_zalloc(sizeof (*range), KM_SLEEP);
range->eos_marker = B_TRUE;
bqueue_enqueue_flush(&smt_arg->q, range, 1);
spl_fstrans_unmark(cookie);
thread_exit();
Expand Down

0 comments on commit 82ad2a0

Please sign in to comment.