Merge pull request #1260 from stefanha/fix-vhost-user-blk-detach

devices: fix attach count for vhost-user-blk
This commit is contained in:
James O. D. Hunt 2019-02-21 16:57:11 +00:00 committed by GitHub
commit b96ca2237f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,7 +56,7 @@ func (device *VhostUserBlkDevice) Attach(devReceiver api.DeviceReceiver) (err er
// Detach is standard interface of api.Device, it's used to remove device from some
// DeviceReceiver
func (device *VhostUserBlkDevice) Detach(devReceiver api.DeviceReceiver) error {
skip, err := device.bumpAttachCount(true)
skip, err := device.bumpAttachCount(false)
if err != nil {
return err
}