summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/zfs/arc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c
index 9fac5a6c4..5764a63a4 100644
--- a/module/zfs/arc.c
+++ b/module/zfs/arc.c
@@ -2510,6 +2510,12 @@ arc_hdr_free_on_write(arc_buf_hdr_t *hdr)
size, hdr);
}
(void) refcount_remove_many(&state->arcs_size, size, hdr);
+ if (type == ARC_BUFC_METADATA) {
+ arc_space_return(size, ARC_SPACE_META);
+ } else {
+ ASSERT(type == ARC_BUFC_DATA);
+ arc_space_return(size, ARC_SPACE_DATA);
+ }
l2arc_free_abd_on_write(hdr->b_l1hdr.b_pabd, size, type);
}