mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
[SCSI] fix bsg queue oops with iscsi logout
Delay bsg unregistration, because we want to wait until all the request/cmds have released their reference. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
parent
67951f6380
commit
4b6f5b3a99
1 changed files with 1 additions and 1 deletions
|
@ -294,6 +294,7 @@ static void scsi_device_dev_release_usercontext(struct work_struct *work)
|
|||
}
|
||||
|
||||
if (sdev->request_queue) {
|
||||
bsg_unregister_queue(sdev->request_queue);
|
||||
sdev->request_queue->queuedata = NULL;
|
||||
/* user context needed to free queue */
|
||||
scsi_free_queue(sdev->request_queue);
|
||||
|
@ -857,7 +858,6 @@ void __scsi_remove_device(struct scsi_device *sdev)
|
|||
if (scsi_device_set_state(sdev, SDEV_CANCEL) != 0)
|
||||
return;
|
||||
|
||||
bsg_unregister_queue(sdev->request_queue);
|
||||
class_device_unregister(&sdev->sdev_classdev);
|
||||
transport_remove_device(dev);
|
||||
device_del(dev);
|
||||
|
|
Loading…
Reference in a new issue