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

PR: 276341
Approved by: so
Security: FreeBSD-EN-24:10.zfs

(cherry picked from commit 02c5aa9b092818785ed8db4e2246a828278138e3)
(cherry picked from commit 1c27279ed22d2b5226f31836da041bae45a9c77b)

Details

Provenance
mavAuthored on May 25 2024, 2:11 AM
gordonCommitted on Tue, Jun 18, 5:35 PM
Parents
rG10e31f0946d8: Update in preparation for 14.1-RELEASE
Branches
Unknown
Tags
Unknown