mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
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. A previously version of this had erronously also pruned the `range->eos_marker = B_TRUE` line, but it must be set whenever we encounter an error or are cancelled early. Coverity incorrectly complained about a potential NULL pointer dereference because of this. Reported-by: Coverity (CID 1524550) Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes #14210
This commit is contained in:
parent
b5459dd354
commit
8532da5e20
@ -1586,8 +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);
|
||||
|
Loading…
Reference in New Issue
Block a user