mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 11:18:52 +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
@@ -1396,8 +1396,7 @@ dmu_tx_do_callbacks(list_t *cb_list, int error)
|
||||
{
|
||||
dmu_tx_callback_t *dcb;
|
||||
|
||||
while ((dcb = list_tail(cb_list)) != NULL) {
|
||||
list_remove(cb_list, dcb);
|
||||
while ((dcb = list_remove_tail(cb_list)) != NULL) {
|
||||
dcb->dcb_func(dcb->dcb_data, error);
|
||||
kmem_free(dcb, sizeof (dmu_tx_callback_t));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user