From 3306adcfcf3c19b52b7bad81f372ad2d75d42708 Mon Sep 17 00:00:00 2001 From: Jeff Roberson Date: Sun, 9 Feb 2003 22:39:51 +0000 Subject: [PATCH] - Correct another atomic op. Spotted by: alc --- sys/kern/vfs_bio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 5723ed1af5fa..1fab37d44029 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -2702,7 +2702,8 @@ allocbuf(struct buf *bp, int size) } else { free(bp->b_data, M_BIOBUF); if (bp->b_bufsize) { - atomic_add_int(&bufmallocspace, + atomic_subtract_int( + &bufmallocspace, bp->b_bufsize); bufspacewakeup(); bp->b_bufsize = 0;