Skip to content

Commit

Permalink
abd_os: remove redundant refcount creation for abd_children
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hpingfs authored May 9, 2022
1 parent d1fd6db commit a18d13c
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion module/os/linux/zfs/abd_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,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);

Expand Down

0 comments on commit a18d13c

Please sign in to comment.