Don't call arc_buf_destroy on unallocated arc_buf
Fixes an obvious issue of calling arc_buf_destroy() on an unallocated arc_buf. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matt Ahrens <matt@delphix.com> Reviewed-by: Paul Dagnelie <pcd@delphix.com> Signed-off-by: Chris Dunlop <chris@onthe.net.au> Closes #9453
This commit is contained in:
parent
64b2e7d7ec
commit
05d07ba9a7
|
@ -924,6 +924,7 @@ do_dump(dmu_send_cookie_t *dscp, struct send_range *range)
|
|||
blkptr_t *bp = &srdp->bp;
|
||||
spa_t *spa =
|
||||
dmu_objset_spa(dscp->dsc_os);
|
||||
arc_buf_t *abuf = NULL;
|
||||
|
||||
ASSERT3U(srdp->datablksz, ==, BP_GET_LSIZE(bp));
|
||||
ASSERT3U(range->start_blkid + 1, ==, range->end_blkid);
|
||||
|
@ -936,7 +937,6 @@ do_dump(dmu_send_cookie_t *dscp, struct send_range *range)
|
|||
zioflags |= ZIO_FLAG_RAW;
|
||||
}
|
||||
|
||||
arc_buf_t *abuf;
|
||||
zbookmark_phys_t zb;
|
||||
ASSERT3U(range->start_blkid, ==, DMU_SPILL_BLKID);
|
||||
zb.zb_objset = dmu_objset_id(dscp->dsc_os);
|
||||
|
@ -949,7 +949,9 @@ do_dump(dmu_send_cookie_t *dscp, struct send_range *range)
|
|||
zioflags, &aflags, &zb) != 0)
|
||||
return (SET_ERROR(EIO));
|
||||
|
||||
err = dump_spill(dscp, bp, zb.zb_object, abuf->b_data);
|
||||
err = dump_spill(dscp, bp, zb.zb_object,
|
||||
(abuf == NULL ? NULL : abuf->b_data));
|
||||
if (abuf != NULL)
|
||||
arc_buf_destroy(abuf, &abuf);
|
||||
return (err);
|
||||
}
|
||||
|
@ -965,7 +967,6 @@ do_dump(dmu_send_cookie_t *dscp, struct send_range *range)
|
|||
dscp->dsc_resume_offset));
|
||||
/* it's a level-0 block of a regular object */
|
||||
arc_flags_t aflags = ARC_FLAG_WAIT;
|
||||
arc_buf_t *abuf = NULL;
|
||||
uint64_t offset;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue