mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +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:
@@ -3782,8 +3782,7 @@ snaplist_destroy(list_t *l, const void *tag)
|
||||
if (l == NULL || !list_link_active(&l->list_head))
|
||||
return;
|
||||
|
||||
while ((snap = list_tail(l)) != NULL) {
|
||||
list_remove(l, snap);
|
||||
while ((snap = list_remove_tail(l)) != NULL) {
|
||||
dsl_dataset_rele(snap->ds, tag);
|
||||
kmem_free(snap, sizeof (*snap));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user