Revert "Cleanup: Delete dead code from send_merge_thread()"

This reverts commit fb823de9f 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 #14042
Closes #14104
This commit is contained in:
Brian Behlendorf 2022-10-28 13:25:37 -07:00 committed by GitHub
parent 5f0a48c7c9
commit 82ad2a06ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();