mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +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:
@@ -493,10 +493,8 @@ zfs_acl_release_nodes(zfs_acl_t *aclp)
|
||||
{
|
||||
zfs_acl_node_t *aclnode;
|
||||
|
||||
while ((aclnode = list_head(&aclp->z_acl))) {
|
||||
list_remove(&aclp->z_acl, aclnode);
|
||||
while ((aclnode = list_remove_head(&aclp->z_acl)))
|
||||
zfs_acl_node_free(aclnode);
|
||||
}
|
||||
aclp->z_acl_count = 0;
|
||||
aclp->z_acl_bytes = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user