zfs_refcount_remove: explictly ignore returns
Coverity noticed that sometimes we ignore the return, and sometimes we don't. Its not wrong, and I like consistent style, so here we are. Reported-by: Coverity (CID-1564584) Reported-by: Coverity (CID-1564585) Reported-by: Coverity (CID-1564586) Reported-by: Coverity (CID-1564587) Reported-by: Coverity (CID-1564588) Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rob Norris <robn@despairlabs.com> Closes #15647
This commit is contained in:
parent
11656234b5
commit
4836d293c0
|
@ -6069,7 +6069,7 @@ arc_prune_task(void *ptr)
|
||||||
if (func != NULL)
|
if (func != NULL)
|
||||||
func(ap->p_adjust, ap->p_private);
|
func(ap->p_adjust, ap->p_private);
|
||||||
|
|
||||||
zfs_refcount_remove(&ap->p_refcnt, func);
|
(void) zfs_refcount_remove(&ap->p_refcnt, func);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -6098,7 +6098,7 @@ arc_prune_async(uint64_t adjust)
|
||||||
ap->p_adjust = adjust;
|
ap->p_adjust = adjust;
|
||||||
if (taskq_dispatch(arc_prune_taskq, arc_prune_task,
|
if (taskq_dispatch(arc_prune_taskq, arc_prune_task,
|
||||||
ap, TQ_SLEEP) == TASKQID_INVALID) {
|
ap, TQ_SLEEP) == TASKQID_INVALID) {
|
||||||
zfs_refcount_remove(&ap->p_refcnt, ap->p_pfunc);
|
(void) zfs_refcount_remove(&ap->p_refcnt, ap->p_pfunc);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ARCSTAT_BUMP(arcstat_prune);
|
ARCSTAT_BUMP(arcstat_prune);
|
||||||
|
@ -7720,7 +7720,7 @@ arc_fini(void)
|
||||||
|
|
||||||
mutex_enter(&arc_prune_mtx);
|
mutex_enter(&arc_prune_mtx);
|
||||||
while ((p = list_remove_head(&arc_prune_list)) != NULL) {
|
while ((p = list_remove_head(&arc_prune_list)) != NULL) {
|
||||||
zfs_refcount_remove(&p->p_refcnt, &arc_prune_list);
|
(void) zfs_refcount_remove(&p->p_refcnt, &arc_prune_list);
|
||||||
zfs_refcount_destroy(&p->p_refcnt);
|
zfs_refcount_destroy(&p->p_refcnt);
|
||||||
kmem_free(p, sizeof (*p));
|
kmem_free(p, sizeof (*p));
|
||||||
}
|
}
|
||||||
|
@ -8301,7 +8301,8 @@ top:
|
||||||
ARCSTAT_BUMPDOWN(arcstat_l2_log_blk_count);
|
ARCSTAT_BUMPDOWN(arcstat_l2_log_blk_count);
|
||||||
zfs_refcount_remove_many(&dev->l2ad_lb_asize, asize,
|
zfs_refcount_remove_many(&dev->l2ad_lb_asize, asize,
|
||||||
lb_ptr_buf);
|
lb_ptr_buf);
|
||||||
zfs_refcount_remove(&dev->l2ad_lb_count, lb_ptr_buf);
|
(void) zfs_refcount_remove(&dev->l2ad_lb_count,
|
||||||
|
lb_ptr_buf);
|
||||||
kmem_free(lb_ptr_buf->lb_ptr,
|
kmem_free(lb_ptr_buf->lb_ptr,
|
||||||
sizeof (l2arc_log_blkptr_t));
|
sizeof (l2arc_log_blkptr_t));
|
||||||
kmem_free(lb_ptr_buf, sizeof (l2arc_lb_ptr_buf_t));
|
kmem_free(lb_ptr_buf, sizeof (l2arc_lb_ptr_buf_t));
|
||||||
|
@ -8772,7 +8773,8 @@ retry:
|
||||||
ARCSTAT_BUMPDOWN(arcstat_l2_log_blk_count);
|
ARCSTAT_BUMPDOWN(arcstat_l2_log_blk_count);
|
||||||
zfs_refcount_remove_many(&dev->l2ad_lb_asize, asize,
|
zfs_refcount_remove_many(&dev->l2ad_lb_asize, asize,
|
||||||
lb_ptr_buf);
|
lb_ptr_buf);
|
||||||
zfs_refcount_remove(&dev->l2ad_lb_count, lb_ptr_buf);
|
(void) zfs_refcount_remove(&dev->l2ad_lb_count,
|
||||||
|
lb_ptr_buf);
|
||||||
list_remove(&dev->l2ad_lbptr_list, lb_ptr_buf);
|
list_remove(&dev->l2ad_lbptr_list, lb_ptr_buf);
|
||||||
kmem_free(lb_ptr_buf->lb_ptr,
|
kmem_free(lb_ptr_buf->lb_ptr,
|
||||||
sizeof (l2arc_log_blkptr_t));
|
sizeof (l2arc_log_blkptr_t));
|
||||||
|
|
Loading…
Reference in New Issue