diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index ea322343d89a..2f0f3a637f7e 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -2231,7 +2231,7 @@ bufwrite(struct buf *bp) } if (bp->b_flags & B_BARRIER) - barrierwrites++; + atomic_add_long(&barrierwrites, 1); oldflags = bp->b_flags;