diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index ccd1b6469f16..6b8f79f96232 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -2909,7 +2909,7 @@ getnewbuf(struct vnode *vp, int slpflag, int slptimeo, int maxsize, int gbflags) } while(buf_scan(false) == 0); if (reserved) - bufspace_release(maxsize); + atomic_subtract_long(&bufspace, maxsize); if (bp != NULL) { bp->b_flags |= B_INVAL; brelse(bp);