]> git.proxmox.com Git - mirror_zfs.git/commitdiff
OpenZFS 9321 - arc_loan_compressed_buf() can increment arc_loaned_bytes by the wrong...
authorAllan Jude <allanjude@freebsd.org>
Tue, 20 Feb 2018 05:31:14 +0000 (00:31 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 27 Mar 2018 03:40:15 +0000 (20:40 -0700)
Authored by: Allan Jude <allanjude@freebsd.org>
Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Approved by: Garrett D'Amore <garrett@damore.org>
Ported-by: Giuseppe Di Natale <dinatale2@llnl.gov>
OpenZFS-issue: https://www.illumos.org/issues/9321
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/92b05f3a18
Closes #7333

module/zfs/arc.c

index 350aafa1f80ca4ceeff599247a9d1ff0c8a069f5..81da36a42c5c4acf3a1cc00ec43f4bd947e1e598 100644 (file)
@@ -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);
 }