kernel - Fix spinlock held on switch
commit8bbb2fba43dfa487685677b4a83d34de08775925
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 6 Nov 2010 17:29:46 +0000 (6 10:29 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 6 Nov 2010 17:29:46 +0000 (6 10:29 -0700)
tree89337169d0aa0e21efd46ea6f8636cdbffa69efb
parent136e843fb06cb9682ff05052bf187c08124ec4c2
kernel - Fix spinlock held on switch

* flushbufqueues() was holding bufqspin through a buffer cache callback,
  causing a kernel panic if the callback winds up blocking.  This only
  effected UFS not HAMMER).

* Release the spinlock a little earlier so it isn't held around the callback.

* Make a minor semantics change to bio_track_wait() to deal with potential
  compiler optimizations messing up the cmpxchg loop.

Reported-by: "goetz@net-amp.com" <goetz@net-amp.com>
sys/kern/vfs_bio.c