aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorhping <[email protected]>2022-05-10 07:30:16 +0800
committerBrian Behlendorf <[email protected]>2022-05-20 10:33:24 -0700
commitb28c0c4bf8ca6edc6c5e23e4be7ea5999fa1ae15 (patch)
treecb1036588e06c25a60f6c9a7d309b78761a719be /module
parenteee389ba2e8c07e230ac876e759902343a1f7469 (diff)
abd_os: remove redundant refcount creation for abd_children
Refcount creation for abd_zero_scatter->abd_children is redundant in abd_alloc_zero_scatter, as it has been done in abd_init_struct. In addition, abd_children is undefined when ZFS_DEBUG is disabled, the reference of abd_children in abd_alloc_zero_scatter breaks build of libzpool when ZFS_DEBUG is disabled. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Brian Atkinson <[email protected]> Signed-off-by: Ping Huang <[email protected]> Closes #13429
Diffstat (limited to 'module')
-rw-r--r--module/os/linux/zfs/abd_os.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/module/os/linux/zfs/abd_os.c b/module/os/linux/zfs/abd_os.c
index f7ebe4e09..8afa222de 100644
--- a/module/os/linux/zfs/abd_os.c
+++ b/module/os/linux/zfs/abd_os.c
@@ -619,7 +619,6 @@ abd_alloc_zero_scatter(void)
ABD_SCATTER(abd_zero_scatter).abd_offset = 0;
ABD_SCATTER(abd_zero_scatter).abd_nents = nr_pages;
abd_zero_scatter->abd_size = SPA_MAXBLOCKSIZE;
- zfs_refcount_create(&abd_zero_scatter->abd_children);
ABD_SCATTER(abd_zero_scatter).abd_sgl = vmem_alloc(nr_pages *
sizeof (struct scatterlist), KM_SLEEP);