]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Cleanup: Delete dead code from send_merge_thread()
authorRichard Yao <richard.yao@alumni.stonybrook.edu>
Wed, 16 Nov 2022 21:38:19 +0000 (16:38 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 29 Nov 2022 17:59:53 +0000 (09:59 -0800)
commit8532da5e20b90bed8decd22726a70c7c81ef6951
tree20e74ba0b09cfa9bac3e46509552cefd61b084e3
parentb5459dd3541e76a46d3c49b480742ded05c429fd
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
module/zfs/dmu_send.c