mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-23 05:31:28 +00:00
scst/sysfs: Introduce scst_tgt_find_acg()
Call scst_tgt_find_acg() instead of iterating explicitly over the ACG list. Signed-off-by: Bart Van Assche <bvanassche@acm.org> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4377 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1830,7 +1830,7 @@ static int scst_process_ini_group_mgmt_store(char *buffer,
|
||||
{
|
||||
int res, action;
|
||||
char *p, *pp;
|
||||
struct scst_acg *a, *acg = NULL;
|
||||
struct scst_acg *acg;
|
||||
enum {
|
||||
SCST_INI_GROUP_ACTION_CREATE = 1,
|
||||
SCST_INI_GROUP_ACTION_DEL = 2,
|
||||
@@ -1871,14 +1871,7 @@ static int scst_process_ini_group_mgmt_store(char *buffer,
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
list_for_each_entry(a, &tgt->tgt_acg_list, acg_list_entry) {
|
||||
if (strcmp(a->acg_name, p) == 0) {
|
||||
TRACE_DBG("group (acg) %p %s found",
|
||||
a, a->acg_name);
|
||||
acg = a;
|
||||
break;
|
||||
}
|
||||
}
|
||||
acg = scst_tgt_find_acg(tgt, p);
|
||||
|
||||
switch (action) {
|
||||
case SCST_INI_GROUP_ACTION_CREATE:
|
||||
|
||||
Reference in New Issue
Block a user