aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/zfs_fuid.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/zfs/zfs_fuid.c')
-rw-r--r--module/zfs/zfs_fuid.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/module/zfs/zfs_fuid.c b/module/zfs/zfs_fuid.c
index 44aaae9c1..add4241dc 100644
--- a/module/zfs/zfs_fuid.c
+++ b/module/zfs/zfs_fuid.c
@@ -699,19 +699,15 @@ zfs_fuid_info_free(zfs_fuid_info_t *fuidp)
zfs_fuid_t *zfuid;
zfs_fuid_domain_t *zdomain;
- while ((zfuid = list_head(&fuidp->z_fuids)) != NULL) {
- list_remove(&fuidp->z_fuids, zfuid);
+ while ((zfuid = list_remove_head(&fuidp->z_fuids)) != NULL)
kmem_free(zfuid, sizeof (zfs_fuid_t));
- }
if (fuidp->z_domain_table != NULL)
kmem_free(fuidp->z_domain_table,
(sizeof (char *)) * fuidp->z_domain_cnt);
- while ((zdomain = list_head(&fuidp->z_domains)) != NULL) {
- list_remove(&fuidp->z_domains, zdomain);
+ while ((zdomain = list_remove_head(&fuidp->z_domains)) != NULL)
kmem_free(zdomain, sizeof (zfs_fuid_domain_t));
- }
kmem_free(fuidp, sizeof (zfs_fuid_info_t));
}