diff options
author | Christoph Hellwig <hch@lst.de> | 2016-03-29 13:03:35 +0200 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2016-03-30 20:06:44 -0700 |
commit | 839559e10601ed4459c802cbfb69747bf1844078 (patch) | |
tree | 7a0201a0b4ff509092dd522cac49ee6f77a16fbd /drivers/target/target_core_fabric_configfs.c | |
parent | e6e202edf000004422a901dfa301d600e32f17e3 (diff) | |
download | talos-obmc-linux-839559e10601ed4459c802cbfb69747bf1844078.tar.gz talos-obmc-linux-839559e10601ed4459c802cbfb69747bf1844078.zip |
target: add a new add_wwn_groups fabrics method
We need to have the WWN fully initialized before addig default groups to it,
so add a new method to add these groups after the WWN has been initialized.
Also remove the default groups in the core while we're at it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_fabric_configfs.c')
-rw-r--r-- | drivers/target/target_core_fabric_configfs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/target/target_core_fabric_configfs.c b/drivers/target/target_core_fabric_configfs.c index 5991a4f816d8..31a096aa16ab 100644 --- a/drivers/target/target_core_fabric_configfs.c +++ b/drivers/target/target_core_fabric_configfs.c @@ -891,6 +891,7 @@ static void target_fabric_release_wwn(struct config_item *item) struct se_wwn, wwn_group); struct target_fabric_configfs *tf = wwn->wwn_tf; + configfs_remove_default_groups(&wwn->fabric_stat_group); tf->tf_ops->fabric_drop_wwn(wwn); } @@ -944,6 +945,8 @@ static struct config_group *target_fabric_make_wwn( &tf->tf_wwn_fabric_stats_cit); configfs_add_default_group(&wwn->fabric_stat_group, &wwn->wwn_group); + if (tf->tf_ops->add_wwn_groups) + tf->tf_ops->add_wwn_groups(wwn); return &wwn->wwn_group; } |