l2arc: reset b_tmp_cdata to NULL in the case of unset b_daddr

The change is in arc_buf_l2_cdata_free().
Without this we can trip the assertion in arc_hdr_realloc()
if INVARIANTS option is enabled.

Approved by:	re (kib)
MFC after:	1 week
This commit is contained in:
Andriy Gapon 2016-06-13 18:39:13 +00:00
parent e2a03c1fe5
commit 55be2f79e5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=301873

View File

@ -2249,6 +2249,7 @@ arc_buf_l2_cdata_free(arc_buf_hdr_t *hdr)
ASSERT3P(hdr->b_l1hdr.b_tmp_cdata, ==,
hdr->b_l1hdr.b_buf->b_data);
ASSERT3U(hdr->b_l2hdr.b_compress, ==, ZIO_COMPRESS_OFF);
hdr->b_l1hdr.b_tmp_cdata = NULL;
return;
}