HomeFreeBSD

Destroy ARC buffer in case of fill error

Description

Destroy ARC buffer in case of fill error

In case of error dmu_buf_fill_done() returns the buffer back into
DB_UNCACHED state. Since during transition from DB_UNCACHED into
DB_FILL state dbuf_noread() allocates an ARC buffer, we must free
it here, otherwise it will be leaked.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15665
Closes #15802
Closes #16216

Details

Provenance
mavAuthored on May 25 2024, 2:11 AM
Tony Hutter <hutter2@llnl.gov>Committed on Jul 17 2024, 9:54 PM
Parents
rG27cc6df760ed: Use memset to zero stack allocations containing unions
Branches
Unknown
Tags
Unknown