scst_lib: Convert a comment into a runtime check

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7167 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2017-05-04 02:45:35 +00:00
parent 3abfda9ec0
commit 386cd25f98

View File

@@ -2753,13 +2753,16 @@ out:
return;
}
/* The activity supposed to be suspended and scst_mutex held */
void scst_report_luns_changed(struct scst_acg *acg)
{
struct scst_session *sess;
TRACE_ENTRY();
/* To protect acg_sess_list */
scst_assert_activity_suspended();
lockdep_assert_held(&scst_mutex);
TRACE_DBG("REPORTED LUNS DATA CHANGED (acg %s)", acg->acg_name);
list_for_each_entry(sess, &acg->acg_sess_list, acg_sess_list_entry) {