Commit e6e202ed authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Nicholas Bellinger

target: initialize the nacl base CIT begfore init_nodeacl

The iSCSI targets wants to add a default group, for which we need to
have the list of default groups initialized previously.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent ce7043fd
...@@ -381,14 +381,6 @@ static struct config_group *target_fabric_make_nodeacl( ...@@ -381,14 +381,6 @@ static struct config_group *target_fabric_make_nodeacl(
if (IS_ERR(se_nacl)) if (IS_ERR(se_nacl))
return ERR_CAST(se_nacl); return ERR_CAST(se_nacl);
if (tf->tf_ops->fabric_init_nodeacl) {
int ret = tf->tf_ops->fabric_init_nodeacl(se_nacl, name);
if (ret) {
core_tpg_del_initiator_node_acl(se_nacl);
return ERR_PTR(ret);
}
}
config_group_init_type_name(&se_nacl->acl_group, name, config_group_init_type_name(&se_nacl->acl_group, name,
&tf->tf_tpg_nacl_base_cit); &tf->tf_tpg_nacl_base_cit);
...@@ -412,6 +404,15 @@ static struct config_group *target_fabric_make_nodeacl( ...@@ -412,6 +404,15 @@ static struct config_group *target_fabric_make_nodeacl(
configfs_add_default_group(&se_nacl->acl_fabric_stat_group, configfs_add_default_group(&se_nacl->acl_fabric_stat_group,
&se_nacl->acl_group); &se_nacl->acl_group);
if (tf->tf_ops->fabric_init_nodeacl) {
int ret = tf->tf_ops->fabric_init_nodeacl(se_nacl, name);
if (ret) {
configfs_remove_default_groups(&se_nacl->acl_fabric_stat_group);
core_tpg_del_initiator_node_acl(se_nacl);
return ERR_PTR(ret);
}
}
return &se_nacl->acl_group; return &se_nacl->acl_group;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment