Commit 60daca10 authored by Mike Christie's avatar Mike Christie Committed by Martin K. Petersen

scsi: tcm_fc: use target_remove_session

This converts tcm_fc to use target_remove_session

tcm_fc was calling transport_deregister_session_configfs then calling
transport_deregister_session when commands have completed. It should be ok
for it to call transport_deregister_session_configfs later via
target_remove_session because transport_deregister_session_configfs only
prevents access from configfs via tpg removal and its call to the
close_session callback for that driver, and this is already protected by
the ft_lport_lock and its port lookup handling.
Signed-off-by: default avatarMike Christie <mchristi@redhat.com>
Reviewed-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Cc: Johannes Thumshirn <jth@kernel.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent b287e351
...@@ -287,7 +287,6 @@ static struct ft_sess *ft_sess_delete(struct ft_tport *tport, u32 port_id) ...@@ -287,7 +287,6 @@ static struct ft_sess *ft_sess_delete(struct ft_tport *tport, u32 port_id)
static void ft_close_sess(struct ft_sess *sess) static void ft_close_sess(struct ft_sess *sess)
{ {
transport_deregister_session_configfs(sess->se_sess);
target_sess_cmd_list_set_waiting(sess->se_sess); target_sess_cmd_list_set_waiting(sess->se_sess);
target_wait_for_sess_cmds(sess->se_sess); target_wait_for_sess_cmds(sess->se_sess);
ft_sess_put(sess); ft_sess_put(sess);
...@@ -448,7 +447,7 @@ static void ft_sess_free(struct kref *kref) ...@@ -448,7 +447,7 @@ static void ft_sess_free(struct kref *kref)
{ {
struct ft_sess *sess = container_of(kref, struct ft_sess, kref); struct ft_sess *sess = container_of(kref, struct ft_sess, kref);
transport_deregister_session(sess->se_sess); target_remove_session(sess->se_sess);
kfree_rcu(sess, rcu); kfree_rcu(sess, rcu);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment