Skip to content
This repository has been archived by the owner on Nov 7, 2019. It is now read-only.

Commit

Permalink
7867 ARC space accounting leak
Browse files Browse the repository at this point in the history
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>

Closes #300
  • Loading branch information
avg-I authored and ahrens committed Mar 7, 2017
1 parent 4d519e7 commit aa1f740
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions usr/src/uts/common/fs/zfs/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2587,6 +2587,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_data_on_write(hdr->b_l1hdr.b_pdata, size, type);
}
Expand Down

0 comments on commit aa1f740

Please sign in to comment.