HomeFreeBSD

Add an assert to clarify code

Description

Add an assert to clarify code

The first time through the loop prevdb and prevhdl are NULL. They
are then both set, but only prevdb is checked. Add an ASSERT to
make it clear that prevhdl must be set when prevdb is.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Kleber <klebertarcisio@yahoo.com.br>
Closes #10754
Closes #11575

Details

Provenance
Kleber Tarcísio <klebertarcisio@yahoo.com.br>Authored on Feb 9 2021, 7:14 PM
GitHub <noreply@github.com>Committed on Feb 9 2021, 7:14 PM
Parents
rGf8ce8aed0c8d: Set file mode during zfs_write
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG4f22619ae3ab: Add an assert to clarify code (authored by Kleber Tarcísio <klebertarcisio@yahoo.com.br>).Feb 9 2021, 7:14 PM