kernel - Use atomic ops for devstat's ds->busy_count field.
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 19 Jan 2011 19:12:47 +0000 (11:12 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 19 Jan 2011 19:12:47 +0000 (11:12 -0800)
commit8bd60bc26686ba32daa68a8196296ecbc2d048a3
tree7acf8ffad02ebf88c8f98b382d0d299d7ed65b0a
parent932f082b4837b95077a59fdde7ddfac1a5c43776
kernel - Use atomic ops for devstat's ds->busy_count field.

* Use atomic ops to manage the busy_count field as these functions can
  be called MP.

* This should avoid negative busy_count transitions due to MP races on the
  field.

Reported-by: Peter Avalos <peter@theshell.com>
sys/kern/subr_devstat.c