mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
Use list_remove_head() where possible.
... instead of list_head() + list_remove(). On FreeBSD the list functions are not inlined, so in addition to more compact code this also saves another function call. Reviewed-by: Brian Atkinson <batkinson@lanl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Closes #14955
This commit is contained in:
+1
-2
@@ -1522,9 +1522,8 @@ zfs_ereport_fini(void)
|
||||
{
|
||||
recent_events_node_t *entry;
|
||||
|
||||
while ((entry = list_head(&recent_events_list)) != NULL) {
|
||||
while ((entry = list_remove_head(&recent_events_list)) != NULL) {
|
||||
avl_remove(&recent_events_tree, entry);
|
||||
list_remove(&recent_events_list, entry);
|
||||
kmem_free(entry, sizeof (*entry));
|
||||
}
|
||||
avl_destroy(&recent_events_tree);
|
||||
|
||||
Reference in New Issue
Block a user