target: Fix se_tpg_tfo->tf_subsys regression + remove tf_subsystem
There is just one configfs subsystem in the target code, so we might as
well add two helpers to reference / unreference it from the core code
instead of passing pointers to it around.
This fixes a regression introduced for v4.1-rc1 with commit 9ac8928e6
,
where configfs_depend_item() callers using se_tpg_tfo->tf_subsys would
fail, because the assignment from the original target_core_subsystem[]
is no longer happening at target_register_template() time.
(Fix target_core_exit_configfs pointer dereference - Sagi)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:

committed by
Nicholas Bellinger

parent
ee7619f2eb
commit
d588cf8f61
@@ -40,8 +40,6 @@ struct target_fabric_configfs {
|
||||
struct config_item *tf_fabric;
|
||||
/* Passed from fabric modules */
|
||||
struct config_item_type *tf_fabric_cit;
|
||||
/* Pointer to target core subsystem */
|
||||
struct configfs_subsystem *tf_subsys;
|
||||
/* Pointer to fabric's struct module */
|
||||
struct module *tf_module;
|
||||
struct target_core_fabric_ops tf_ops;
|
||||
|
@@ -4,7 +4,6 @@
|
||||
struct target_core_fabric_ops {
|
||||
struct module *module;
|
||||
const char *name;
|
||||
struct configfs_subsystem *tf_subsys;
|
||||
char *(*get_fabric_name)(void);
|
||||
u8 (*get_fabric_proto_ident)(struct se_portal_group *);
|
||||
char *(*tpg_get_wwn)(struct se_portal_group *);
|
||||
@@ -109,6 +108,9 @@ struct target_core_fabric_ops {
|
||||
int target_register_template(const struct target_core_fabric_ops *fo);
|
||||
void target_unregister_template(const struct target_core_fabric_ops *fo);
|
||||
|
||||
int target_depend_item(struct config_item *item);
|
||||
void target_undepend_item(struct config_item *item);
|
||||
|
||||
struct se_session *transport_init_session(enum target_prot_op);
|
||||
int transport_alloc_session_tags(struct se_session *, unsigned int,
|
||||
unsigned int);
|
||||
|
Reference in New Issue
Block a user