diff options
author | Allan Jude <[email protected]> | 2018-02-20 00:31:14 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-03-26 20:40:15 -0700 |
commit | 5152a740885dd7784681b5080735f941d993aa5f (patch) | |
tree | b6c40ecdbe3e364c2b3a7372521f7435e68e9d89 /module | |
parent | 9ea6c3d39def9a1e25d2b8bc327667cf45d67409 (diff) |
OpenZFS 9321 - arc_loan_compressed_buf() can increment arc_loaned_bytes by the wrong value
Authored by: Allan Jude <[email protected]>
Reviewed by: Matt Ahrens <[email protected]>
Reviewed by: George Wilson <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Approved by: Garrett D'Amore <[email protected]>
Ported-by: Giuseppe Di Natale <[email protected]>
OpenZFS-issue: https://www.illumos.org/issues/9321
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/92b05f3a18
Closes #7333
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/arc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c index 350aafa1f..81da36a42 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -2919,7 +2919,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); } @@ -2931,7 +2931,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); } |