uma: Use atomic load for uz_sleepers

This field is updated locklessly.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
markj 2020-12-06 22:45:22 +00:00
parent d354b5c4f5
commit 13b815c01a

View File

@ -4186,7 +4186,7 @@ uma_zfree_arg(uma_zone_t zone, void *item, void *udata)
* a little longer for the limits to be reset.
*/
if (__predict_false(uz_flags & UMA_ZFLAG_LIMIT)) {
if (zone->uz_sleepers > 0)
if (atomic_load_32(&zone->uz_sleepers) > 0)
goto zfree_item;
}