Skip to content
Permalink
Browse files

Don't call dump_spill or arc_buf_destroy on unallocated arc_buf

Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
  • Loading branch information...
mattmacy committed Oct 9, 2019
1 parent 381d91d commit 2ce207ab996f7ea51d86ce80748c7a99c9b2cc0b
Showing with 8 additions and 8 deletions.
  1. +8 −8 module/zfs/dmu_send.c
@@ -955,14 +955,14 @@ do_dump(dmu_send_cookie_t *dscp, struct send_range *range)
zb.zb_level = 0;
zb.zb_blkid = range->start_blkid;

if (!dscp->dsc_dso->dso_dryrun && arc_read(NULL, spa,
bp, arc_getbuf_func, &abuf, ZIO_PRIORITY_ASYNC_READ,
zioflags, &aflags, &zb) != 0)
return (SET_ERROR(EIO));

err = dump_spill(dscp, bp, zb.zb_object, abuf->b_data);
arc_buf_destroy(abuf, &abuf);
return (err);
if (!dscp->dsc_dso->dso_dryrun) {
if (arc_read(NULL, spa, bp, arc_getbuf_func, &abuf,
ZIO_PRIORITY_ASYNC_READ, zioflags, &aflags, &zb) != 0)
return (SET_ERROR(EIO));
err = dump_spill(dscp, bp, zb.zb_object, abuf->b_data);
arc_buf_destroy(abuf, &abuf);
return (err);
}
}
if (send_do_embed(dscp, bp)) {
err = dump_write_embedded(dscp, range->object,

0 comments on commit 2ce207a

Please sign in to comment.
You can’t perform that action at this time.