Skip to content

Commit

Permalink
9321 arc_loan_compressed_buf() can increment arc_loaned_bytes by the …
Browse files Browse the repository at this point in the history
…wrong value

Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Garrett D'Amore <garrett@damore.org>
  • Loading branch information
allanjude authored and prakashsurya committed Mar 21, 2018
1 parent 14ae03c commit 9be12bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions usr/src/uts/common/fs/zfs/arc.c
Expand Up @@ -2557,7 +2557,7 @@ arc_loan_buf(spa_t *spa, boolean_t is_metadata, int size)
arc_buf_t *buf = arc_alloc_buf(spa, arc_onloan_tag,
is_metadata ? ARC_BUFC_METADATA : ARC_BUFC_DATA, size);

arc_loaned_bytes_update(size);
arc_loaned_bytes_update(arc_buf_size(buf));

return (buf);
}
Expand All @@ -2569,7 +2569,7 @@ arc_loan_compressed_buf(spa_t *spa, uint64_t psize, uint64_t lsize,
arc_buf_t *buf = arc_alloc_compressed_buf(spa, arc_onloan_tag,
psize, lsize, compression_type);

arc_loaned_bytes_update(psize);
arc_loaned_bytes_update(arc_buf_size(buf));

return (buf);
}
Expand Down

0 comments on commit 9be12bd

Please sign in to comment.