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 <richard.yao@alumni.stonybrook.edu>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#14042
Closes openzfs#14104
  • Loading branch information
behlendorf authored and shodanshok committed Nov 3, 2022
1 parent fe5f39a commit a86c2e7
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 a86c2e7

Please sign in to comment.