From 7481deb413be132a22193e8a0bce88b311ecb3c2 Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Sat, 12 Nov 2011 00:32:17 -0800 Subject: target: Make target_put_sess_cmd use target_release_cmd_kref This patch moves target_put_sess_cmd() to use a se_cmd->cmd_kref callback target_release_cmd_kref when performing driver release of fabric->se_cmd descriptor memory. It sets the default cmd_kref count value to '2' within target_get_sess_cmd() setup, and currently assumes TFO->check_stop_free() usage. It drops se_tfo->check_release_cmd() usage in the main transport_release_cmd codepath. Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/target') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index cadd4f6e57e1..af088a9e4905 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -541,6 +541,7 @@ struct se_cmd { struct list_head se_queue_node; struct list_head se_cmd_list; struct completion cmd_wait_comp; + struct kref cmd_kref; struct target_core_fabric_ops *se_tfo; int (*execute_task)(struct se_task *); void (*transport_complete_callback)(struct se_cmd *); -- cgit v1.2.1