mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 02:31:27 +00:00
scst: Suppress a warning in scst_cm_update_dev()
Suppress the following warning: WARNING: CPU: 0 PID: 6998 at scst/src/scst_copy_mgr.c:2672 scst_cm_update_dev+0xdc/0x110 This warning can be triggered during unregistration of a virtual device with the following test case: 1. Change a parameter of the virtual device, e.g. the USN. 2. Delete the LUN. That triggers the following sequence: 1. vdev_del_device() 2. scst_unregister_virtual_device() 3. scst_acg_del_lun() 4. cancel the work struct associated with vdev_inq_changed_fn(). 5. visk_detach() 6. vdev_del_device() finishes. vdev_inq_changed_fn() may get called after a LUN has been unregistered from the copy manager and before device deletion finishes. Reported-by: Gleb Chesnokov <Chesnokov.G@raidix.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9341 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2669,8 +2669,13 @@ void scst_cm_update_dev(struct scst_device *dev)
|
||||
spin_unlock_bh(&dev->dev_lock);
|
||||
|
||||
lun = scst_cm_get_lun(dev);
|
||||
if (WARN_ON_ONCE(lun == SCST_MAX_LUN))
|
||||
if (lun == SCST_MAX_LUN) {
|
||||
/*
|
||||
* Verify that scst_unregister_virtual_device() is in progress.
|
||||
*/
|
||||
WARN_ON_ONCE(!dev->remove_completion);
|
||||
goto out_unblock;
|
||||
}
|
||||
|
||||
rc = scst_cm_send_init_inquiry(dev, lun, NULL);
|
||||
if (rc != 0)
|
||||
|
||||
Reference in New Issue
Block a user