diff --git a/module/zfs/fm.c b/module/zfs/fm.c index a5003f85d..7da5bc035 100644 --- a/module/zfs/fm.c +++ b/module/zfs/fm.c @@ -658,8 +658,7 @@ zfs_zevent_next(zfs_zevent_t *ze, nvlist_t **event, uint64_t *event_size, #ifdef _KERNEL /* Include events dropped due to rate limiting */ - *dropped += ratelimit_dropped; - ratelimit_dropped = 0; + *dropped += atomic_swap_64(&ratelimit_dropped, 0); #endif ze->ze_dropped = 0; out: