diff --git a/scst/src/scst_copy_mgr.c b/scst/src/scst_copy_mgr.c index 5c9ce1345..3127dddea 100644 --- a/scst/src/scst_copy_mgr.c +++ b/scst/src/scst_copy_mgr.c @@ -2738,7 +2738,6 @@ int scst_cm_on_add_acg(struct scst_acg *acg) TRACE_ENTRY(); - scst_assert_activity_suspended(); lockdep_assert_held(&scst_mutex); if (scst_cm_tgt == NULL) @@ -2824,7 +2823,7 @@ static bool scst_cm_check_access_acg(const char *initiator_name, TRACE_ENTRY(); scst_assert_activity_suspended(); - lockdep_assert_held(&scst_mutex); + lockdep_assert_held(&scst_mutex2); list_for_each_entry(acg_dev, &acg->acg_dev_list, acg_dev_list_entry) { if (acg_dev->dev == dev) { diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index bde0ec313..f8bbdd362 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -4669,7 +4669,6 @@ out: return res; } -/* The activity supposed to be suspended and scst_mutex held */ int scst_alloc_add_acg(struct scst_tgt *tgt, const char *acg_name, bool tgt_acg, struct scst_acg **out_acg) { @@ -4678,6 +4677,8 @@ int scst_alloc_add_acg(struct scst_tgt *tgt, const char *acg_name, TRACE_ENTRY(); + lockdep_assert_held(&scst_mutex); + acg = kzalloc(sizeof(*acg), GFP_KERNEL); if (acg == NULL) { PRINT_ERROR("%s", "Allocation of acg failed");