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:
+1
-2
@@ -148,8 +148,7 @@ zfs_zevent_drain(zevent_t *ev)
|
||||
list_remove(&zevent_list, ev);
|
||||
|
||||
/* Remove references to this event in all private file data */
|
||||
while ((ze = list_head(&ev->ev_ze_list)) != NULL) {
|
||||
list_remove(&ev->ev_ze_list, ze);
|
||||
while ((ze = list_remove_head(&ev->ev_ze_list)) != NULL) {
|
||||
ze->ze_zevent = NULL;
|
||||
ze->ze_dropped++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user