Fix a deadlock when removing a mass storage device that had active transfers.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25829 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz
2008-06-06 20:30:58 +00:00
parent cba41147ef
commit e109130a10
@@ -631,9 +631,9 @@ usb_disk_device_removed(void *cookie)
gLunCount -= device->lun_count;
gDeviceCount--;
mutex_lock(&device->lock);
device->removed = true;
mutex_unlock(&device->lock);
gUSBModule->cancel_queued_transfers(device->bulk_in);
gUSBModule->cancel_queued_transfers(device->bulk_out);
if (device->open_count == 0)
usb_disk_free_device_and_luns(device);