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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user