mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
target: Add TFO->put_session() caller for HW fabric session shutdown
This patch adds an optional target_core_fabric_ops->put_session() caller within the existing target_put_session() code path. This is required by tcm_qla2xxx code in order to invoke it's own fabric specific session shutdown handler using se_session->sess_kref. Signed-off-by: Joern Engel <[email protected]> Cc: Roland Dreier <[email protected]> Cc: Arun Easi <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
This commit is contained in:
parent
cfaf025112
commit
4149268e78
2 changed files with 8 additions and 1 deletions
|
|
@ -315,7 +315,7 @@ void transport_register_session(
|
|||
}
|
||||
EXPORT_SYMBOL(transport_register_session);
|
||||
|
||||
static void target_release_session(struct kref *kref)
|
||||
void target_release_session(struct kref *kref)
|
||||
{
|
||||
struct se_session *se_sess = container_of(kref,
|
||||
struct se_session, sess_kref);
|
||||
|
|
@ -332,6 +332,12 @@ EXPORT_SYMBOL(target_get_session);
|
|||
|
||||
void target_put_session(struct se_session *se_sess)
|
||||
{
|
||||
struct se_portal_group *tpg = se_sess->se_tpg;
|
||||
|
||||
if (tpg->se_tpg_tfo->put_session != NULL) {
|
||||
tpg->se_tpg_tfo->put_session(se_sess);
|
||||
return;
|
||||
}
|
||||
kref_put(&se_sess->sess_kref, target_release_session);
|
||||
}
|
||||
EXPORT_SYMBOL(target_put_session);
|
||||
|
|
|
|||
Loading…
Reference in a new issue