mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 03:08:51 +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:
@@ -1490,7 +1490,7 @@ dsl_dir_tempreserve_clear(void *tr_cookie, dmu_tx_t *tx)
|
||||
if (tr_cookie == NULL)
|
||||
return;
|
||||
|
||||
while ((tr = list_head(tr_list)) != NULL) {
|
||||
while ((tr = list_remove_head(tr_list)) != NULL) {
|
||||
if (tr->tr_ds) {
|
||||
mutex_enter(&tr->tr_ds->dd_lock);
|
||||
ASSERT3U(tr->tr_ds->dd_tempreserved[txgidx], >=,
|
||||
@@ -1500,7 +1500,6 @@ dsl_dir_tempreserve_clear(void *tr_cookie, dmu_tx_t *tx)
|
||||
} else {
|
||||
arc_tempreserve_clear(tr->tr_size);
|
||||
}
|
||||
list_remove(tr_list, tr);
|
||||
kmem_free(tr, sizeof (struct tempreserve));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user