scst, copy manager: Skip updating if auto CM assignment is disabled (merge r8504 from trunk)

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@8506 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2019-08-14 23:19:41 +00:00
parent 939cd52eee
commit 1d668e87a0
+5
View File
@@ -2675,6 +2675,10 @@ void scst_cm_update_dev(struct scst_device *dev)
TRACE_MGMT_DBG("copy manager: updating device %s", dev->virt_name);
if (!scst_auto_cm_assignment ||
!dev->handler->auto_cm_assignment_possible)
goto out;
res = scst_suspend_activity(SCST_SUSPEND_TIMEOUT_UNLIMITED);
WARN_ON_ONCE(res);
@@ -2698,6 +2702,7 @@ out_resume:
mutex_unlock(&scst_mutex);
scst_resume_activity();
out:
TRACE_EXIT();
return;