dev_dopen() can be called multiple times with only one dev_dclose() when
authorMatthew Dillon <dillon@dragonflybsd.org>
Wed, 13 Jun 2007 20:53:39 +0000 (20:53 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Wed, 13 Jun 2007 20:53:39 +0000 (20:53 +0000)
commitfca0fce62c7fd37e9f9fa4e34a32917bb5114741
tree1c0272e0cf129f6f212b07da0d6a8d49e6d4c4e9
parent381ec38f84473fcffae5bcc8f48c0278fd31854f
dev_dopen() can be called multiple times with only one dev_dclose() when
D_TRACKCLOSE is not specified.  Make sure multiple opens only reference
the CAM peripheral once and complain if dev_dclose() is called more then
once.

This also prevents bugs in higher layers from propogating to lower ones.
sys/bus/cam/scsi/scsi_da.c