diff options
Diffstat (limited to 'module/zfs')
-rw-r--r-- | module/zfs/arc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c index 7bae2c42d..0c5e66cbe 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -3472,7 +3472,11 @@ arc_prune_async(int64_t adjust) refcount_add(&ap->p_refcnt, ap->p_pfunc); ap->p_adjust = adjust; - taskq_dispatch(arc_prune_taskq, arc_prune_task, ap, TQ_SLEEP); + if (taskq_dispatch(arc_prune_taskq, arc_prune_task, + ap, TQ_SLEEP) == 0) { + refcount_remove(&ap->p_refcnt, ap->p_pfunc); + continue; + } ARCSTAT_BUMP(arcstat_prune); } mutex_exit(&arc_prune_mtx); |