From 50bb06cc559272d6f3a0b6c01a5f248029a16a41 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 25 Mar 2019 16:46:43 +0000 Subject: [PATCH] scst: Avoid that del_device suspends SCSI command processing scst_unregister_virtual_device() modifies scst_dev_list and removes the LUNs associated with the virtual device being removed. Due to previous patches these actions can be performed safely without suspending SCSI command processing. Hence remove the suspend and resume activity calls from scst_unregister_virtual_device(). git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8072 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_copy_mgr.c | 2 -- scst/src/scst_main.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/scst/src/scst_copy_mgr.c b/scst/src/scst_copy_mgr.c index 44a750126..b991f74a5 100644 --- a/scst/src/scst_copy_mgr.c +++ b/scst/src/scst_copy_mgr.c @@ -2727,12 +2727,10 @@ out: return res; } -/* scst_mutex supposed to be held and activities suspended */ void scst_cm_on_dev_unregister(struct scst_device *dev) { TRACE_ENTRY(); - scst_assert_activity_suspended(); lockdep_assert_held(&scst_mutex); scst_cm_dev_unregister(dev, true); diff --git a/scst/src/scst_main.c b/scst/src/scst_main.c index 44fbade8d..6f2f2173b 100644 --- a/scst/src/scst_main.c +++ b/scst/src/scst_main.c @@ -1444,7 +1444,6 @@ void scst_unregister_virtual_device(int id, TRACE_ENTRY(); - scst_suspend_activity(SCST_SUSPEND_TIMEOUT_UNLIMITED); mutex_lock(&scst_mutex); list_for_each_entry(d, &scst_dev_list, dev_list_entry) { @@ -1475,7 +1474,6 @@ void scst_unregister_virtual_device(int id, } mutex_unlock(&scst_mutex); - scst_resume_activity(); scst_dev_sysfs_del(dev);