]> granicus.if.org Git - zfs/commitdiff
OpenZFS 8426 - mark immutable buffer arguments as such in abd.h
authorAndriy Gapon <avg@FreeBSD.org>
Mon, 26 Jun 2017 10:46:45 +0000 (13:46 +0300)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 30 Jun 2017 18:11:01 +0000 (11:11 -0700)
Authored by: Andriy Gapon <avg@FreeBSD.org>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Ported-by: Giuseppe Di Natale <dinatale2@llnl.gov>
OpenZFS-issue: https://www.illumos.org/issues/8426
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/37359a6
Closes #6287

include/sys/abd.h

index d2db7e1996e42a4c098af1bd6b673facee640a0c..59b679491359349ca0e28e740a2c481bbe5ece43 100644 (file)
@@ -142,7 +142,7 @@ abd_copy(abd_t *dabd, abd_t *sabd, size_t size)
 }
 
 static inline void
-abd_copy_from_buf(abd_t *abd, void *buf, size_t size)
+abd_copy_from_buf(abd_t *abd, const void *buf, size_t size)
 {
        abd_copy_from_buf_off(abd, buf, 0, size);
 }
@@ -154,7 +154,7 @@ abd_copy_to_buf(void* buf, abd_t *abd, size_t size)
 }
 
 static inline int
-abd_cmp_buf(abd_t *abd, void *buf, size_t size)
+abd_cmp_buf(abd_t *abd, const void *buf, size_t size)
 {
        return (abd_cmp_buf_off(abd, buf, 0, size));
 }