summaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/arc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c
index 77181b1fd..2dbca8da9 100644
--- a/module/zfs/arc.c
+++ b/module/zfs/arc.c
@@ -1461,6 +1461,13 @@ arc_buf_info(arc_buf_t *ab, arc_buf_info_t *abi, int state_index)
l2arc_buf_hdr_t *l2hdr = NULL;
arc_state_t *state = NULL;
+ memset(abi, 0, sizeof (arc_buf_info_t));
+
+ if (hdr == NULL)
+ return;
+
+ abi->abi_flags = hdr->b_flags;
+
if (HDR_HAS_L1HDR(hdr)) {
l1hdr = &hdr->b_l1hdr;
state = l1hdr->b_state;
@@ -1468,9 +1475,6 @@ arc_buf_info(arc_buf_t *ab, arc_buf_info_t *abi, int state_index)
if (HDR_HAS_L2HDR(hdr))
l2hdr = &hdr->b_l2hdr;
- memset(abi, 0, sizeof (arc_buf_info_t));
- abi->abi_flags = hdr->b_flags;
-
if (l1hdr) {
abi->abi_datacnt = l1hdr->b_datacnt;
abi->abi_access = l1hdr->b_arc_access;