Cleanup: Delete dead code from send_merge_thread()
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. Coverity incorrectly complained about a potential NULL pointer dereference because of this. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes #14042
This commit is contained in:
parent
717641ac09
commit
fb823de9fb
|
@ -1586,9 +1586,8 @@ 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;
|
||||
ASSERT3P(range, !=, NULL);
|
||||
ASSERT3S(range->eos_marker, ==, B_TRUE);
|
||||
bqueue_enqueue_flush(&smt_arg->q, range, 1);
|
||||
spl_fstrans_unmark(cookie);
|
||||
thread_exit();
|
||||
|
|
Loading…
Reference in New Issue