Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup: Delete dead code from send_merge_thread()
Browse files Browse the repository at this point in the history
range is always deferenced before it reaches this check, such that the
kmem_zalloc() call is never executed.

There is also no need to set `range->eos_marker = B_TRUE` because it is
already set.

Signed-off-by: Richard Yao <[email protected]>
ryao committed Oct 17, 2022
1 parent dba4be4 commit 1ce1fde
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions module/zfs/dmu_send.c
Original file line number Diff line number Diff line change
@@ -1586,9 +1586,6 @@ send_merge_thread(void *arg)
}
range_free(front_ranges[i]);
}
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();

0 comments on commit 1ce1fde

Please sign in to comment.