diff --git a/include/os/freebsd/spl/sys/list_impl.h b/include/os/freebsd/spl/sys/list_impl.h index 09b70232e8ee..06a5c6d1dbc6 100644 --- a/include/os/freebsd/spl/sys/list_impl.h +++ b/include/os/freebsd/spl/sys/list_impl.h @@ -39,7 +39,6 @@ struct list_node { }; struct list { - size_t list_size; size_t list_offset; struct list_node list_head; }; diff --git a/include/os/linux/spl/sys/list.h b/include/os/linux/spl/sys/list.h index 80300df15abe..046a75e19353 100644 --- a/include/os/linux/spl/sys/list.h +++ b/include/os/linux/spl/sys/list.h @@ -48,7 +48,6 @@ typedef struct list_head list_node_t; typedef struct list { - size_t list_size; size_t list_offset; list_node_t list_head; } list_t; @@ -72,7 +71,8 @@ list_link_init(list_node_t *node) static inline void list_create(list_t *list, size_t size, size_t offset) { - list->list_size = size; + (void) size; + list->list_offset = offset; INIT_LIST_HEAD(&list->list_head); } diff --git a/lib/libspl/include/sys/list_impl.h b/lib/libspl/include/sys/list_impl.h index 24c1ceb2a9fa..629db34da067 100644 --- a/lib/libspl/include/sys/list_impl.h +++ b/lib/libspl/include/sys/list_impl.h @@ -39,7 +39,6 @@ struct list_node { }; struct list { - size_t list_size; size_t list_offset; struct list_node list_head; }; diff --git a/lib/libspl/list.c b/lib/libspl/list.c index 24403698627c..aaa71dc73c98 100644 --- a/lib/libspl/list.c +++ b/lib/libspl/list.c @@ -65,7 +65,8 @@ list_create(list_t *list, size_t size, size_t offset) ASSERT(size > 0); ASSERT(size >= offset + sizeof (list_node_t)); - list->list_size = size; + (void) size; + list->list_offset = offset; list->list_head.next = list->list_head.prev = &list->list_head; } @@ -194,7 +195,6 @@ list_move_tail(list_t *dst, list_t *src) list_node_t *dstnode = &dst->list_head; list_node_t *srcnode = &src->list_head; - ASSERT(dst->list_size == src->list_size); ASSERT(dst->list_offset == src->list_offset); if (list_empty(src)) diff --git a/module/os/freebsd/spl/list.c b/module/os/freebsd/spl/list.c index ab6049cfbd43..56432050fdc6 100644 --- a/module/os/freebsd/spl/list.c +++ b/module/os/freebsd/spl/list.c @@ -64,7 +64,8 @@ list_create(list_t *list, size_t size, size_t offset) ASSERT3P(list, !=, NULL); ASSERT3U(size, >=, offset + sizeof (list_node_t)); - list->list_size = size; + (void) size; + list->list_offset = offset; list->list_head.list_next = list->list_head.list_prev = &list->list_head; @@ -194,7 +195,6 @@ list_move_tail(list_t *dst, list_t *src) list_node_t *dstnode = &dst->list_head; list_node_t *srcnode = &src->list_head; - ASSERT3U(dst->list_size, ==, src->list_size); ASSERT3U(dst->list_offset, ==, src->list_offset); if (list_empty(src))