diff options
author | Christoph Hellwig <hch@lst.de> | 2016-03-29 13:03:34 +0200 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2016-03-30 20:06:43 -0700 |
commit | e6e202edf000004422a901dfa301d600e32f17e3 (patch) | |
tree | 66fa39bf43afb1072b3eb03aa73205afadd41d1b /drivers/target | |
parent | ce7043fd903eb9722a885b98b53fffe2cedfb047 (diff) | |
download | op-kernel-dev-e6e202edf000004422a901dfa301d600e32f17e3.zip op-kernel-dev-e6e202edf000004422a901dfa301d600e32f17e3.tar.gz |
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: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/target_core_fabric_configfs.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/target/target_core_fabric_configfs.c b/drivers/target/target_core_fabric_configfs.c index 096790a..5991a4f 100644 --- a/drivers/target/target_core_fabric_configfs.c +++ b/drivers/target/target_core_fabric_configfs.c @@ -381,14 +381,6 @@ static struct config_group *target_fabric_make_nodeacl( if (IS_ERR(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, &tf->tf_tpg_nacl_base_cit); @@ -412,6 +404,15 @@ static struct config_group *target_fabric_make_nodeacl( configfs_add_default_group(&se_nacl->acl_fabric_stat_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; } |