HomeFreeBSD

FreeBSD: Code cleanup in zio_crypt

Description

FreeBSD: Code cleanup in zio_crypt

Address some unused value and control flow issues flagged by Coverity.

Unreachable code is pruned and unused values are avoided.
Some scattered sections are reordered for coherence.

We can assume kmem_alloc(n, KM_SLEEP) doesn't fail, so there is no need
to check if it returned NULL. The allocated memory doesn't need to be
zeroed, other than the last iovec (the MAC).

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #10884

Details

Provenance
freqlabsAuthored on Sep 3 2020, 9:15 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Sep 25 2020, 8:12 PM
Parents
rG863e38453ee5: Prune dead branch reported by Coverity
Branches
Unknown
Tags
Unknown

Event Timeline