From cd1a47f85e578d0b4d6d0c562132a8e0ef2618b7 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 14 Aug 2019 23:14:11 +0000 Subject: [PATCH] scst, copy manager: Skip updating if auto CM assignment is disabled Reported-by: James McCarthy git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8504 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_copy_mgr.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scst/src/scst_copy_mgr.c b/scst/src/scst_copy_mgr.c index ac6686f29..eda4dfd6a 100644 --- a/scst/src/scst_copy_mgr.c +++ b/scst/src/scst_copy_mgr.c @@ -2683,6 +2683,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); @@ -2706,6 +2710,7 @@ out_resume: mutex_unlock(&scst_mutex); scst_resume_activity(); +out: TRACE_EXIT(); return;