]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Revert "Cleanup: Delete dead code from send_merge_thread()"
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 28 Oct 2022 20:25:37 +0000 (13:25 -0700)
committerGitHub <noreply@github.com>
Fri, 28 Oct 2022 20:25:37 +0000 (13:25 -0700)
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

module/zfs/dmu_send.c

index 8c96a862762f48043e5a1115fdadd06b591966b9..ccb7eb20756dbf3e6b50c4ef987fe2512baa1fc0 100644 (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();