dmu_zfetch: fix memory leak

The last change caused the read completion callback to not be called
if the IO was still in progress. This change restores allocation
of the arc buf callback, but in the callback path checks the new
acb_nobuf field to know to skip buffer allocation.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #11324
This commit is contained in:
Matthew Macy
2020-12-12 16:00:00 -08:00
committed by GitHub
parent c76a40bfda
commit 923d730329
2 changed files with 4 additions and 4 deletions
+1
View File
@@ -99,6 +99,7 @@ struct arc_callback {
boolean_t acb_encrypted;
boolean_t acb_compressed;
boolean_t acb_noauth;
boolean_t acb_nobuf;
zbookmark_phys_t acb_zb;
zio_t *acb_zio_dummy;
zio_t *acb_zio_head;