diff options
| author | Christoph Hellwig <hch@lst.de> | 2015-05-03 02:50:52 -0400 |
|---|---|---|
| committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-05-30 21:04:20 -0400 |
| commit | d588cf8f618d7b316743a0bc99fede20f7a01bb7 (patch) | |
| tree | ee81f6056ec9868f83338b67256a9e21044f6f84 /include/target | |
| parent | ee7619f2eb21304dcc846b8dc8f8c3d6cbe11792 (diff) | |
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>
Diffstat (limited to 'include/target')
| -rw-r--r-- | include/target/target_core_configfs.h | 2 | ||||
| -rw-r--r-- | include/target/target_core_fabric.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/target/target_core_configfs.h b/include/target/target_core_configfs.h index 25bb04c4209e..b99c01170392 100644 --- a/include/target/target_core_configfs.h +++ b/include/target/target_core_configfs.h | |||
| @@ -40,8 +40,6 @@ struct target_fabric_configfs { | |||
| 40 | struct config_item *tf_fabric; | 40 | struct config_item *tf_fabric; |
| 41 | /* Passed from fabric modules */ | 41 | /* Passed from fabric modules */ |
| 42 | struct config_item_type *tf_fabric_cit; | 42 | struct config_item_type *tf_fabric_cit; |
| 43 | /* Pointer to target core subsystem */ | ||
| 44 | struct configfs_subsystem *tf_subsys; | ||
| 45 | /* Pointer to fabric's struct module */ | 43 | /* Pointer to fabric's struct module */ |
| 46 | struct module *tf_module; | 44 | struct module *tf_module; |
| 47 | struct target_core_fabric_ops tf_ops; | 45 | struct target_core_fabric_ops tf_ops; |
diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h index 17c7f5ac7ea0..0f4dc3768587 100644 --- a/include/target/target_core_fabric.h +++ b/include/target/target_core_fabric.h | |||
| @@ -4,7 +4,6 @@ | |||
| 4 | struct target_core_fabric_ops { | 4 | struct target_core_fabric_ops { |
| 5 | struct module *module; | 5 | struct module *module; |
| 6 | const char *name; | 6 | const char *name; |
| 7 | struct configfs_subsystem *tf_subsys; | ||
| 8 | char *(*get_fabric_name)(void); | 7 | char *(*get_fabric_name)(void); |
| 9 | u8 (*get_fabric_proto_ident)(struct se_portal_group *); | 8 | u8 (*get_fabric_proto_ident)(struct se_portal_group *); |
| 10 | char *(*tpg_get_wwn)(struct se_portal_group *); | 9 | char *(*tpg_get_wwn)(struct se_portal_group *); |
| @@ -109,6 +108,9 @@ struct target_core_fabric_ops { | |||
| 109 | int target_register_template(const struct target_core_fabric_ops *fo); | 108 | int target_register_template(const struct target_core_fabric_ops *fo); |
| 110 | void target_unregister_template(const struct target_core_fabric_ops *fo); | 109 | void target_unregister_template(const struct target_core_fabric_ops *fo); |
| 111 | 110 | ||
| 111 | int target_depend_item(struct config_item *item); | ||
| 112 | void target_undepend_item(struct config_item *item); | ||
| 113 | |||
| 112 | struct se_session *transport_init_session(enum target_prot_op); | 114 | struct se_session *transport_init_session(enum target_prot_op); |
| 113 | int transport_alloc_session_tags(struct se_session *, unsigned int, | 115 | int transport_alloc_session_tags(struct se_session *, unsigned int, |
| 114 | unsigned int); | 116 | unsigned int); |
