diff options
author | Alexander Motin <[email protected]> | 2023-06-09 13:12:52 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2023-06-09 10:12:52 -0700 |
commit | b3ad3f48d9d215ce9bea1090d86ced17862ea441 (patch) | |
tree | 1e0b2cf93d6957ae38b9c924a49ccd9af1ef3916 /module/os/linux/zfs/zfs_acl.c | |
parent | 55b1842f92a24fe7192d129bca7b60882080d31a (diff) |
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 <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Alexander Motin <[email protected]>
Sponsored by: iXsystems, Inc.
Closes #14955
Diffstat (limited to 'module/os/linux/zfs/zfs_acl.c')
-rw-r--r-- | module/os/linux/zfs/zfs_acl.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/module/os/linux/zfs/zfs_acl.c b/module/os/linux/zfs/zfs_acl.c index ff26f47f2..a1fd3c985 100644 --- a/module/os/linux/zfs/zfs_acl.c +++ b/module/os/linux/zfs/zfs_acl.c @@ -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; } |