From 672b0d076e861d92e7204a0bbd04c5490e57d44c Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 2 Apr 2019 04:13:02 +0000 Subject: [PATCH] qla2x00t-32gbit, target: Only initialize session members used by SCST git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8134 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.c b/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.c index aec2692f6..36c9534db 100644 --- a/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.c +++ b/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.c @@ -921,24 +921,12 @@ static void sqa_scst_session_cb(struct scst_session *scst_sess, static struct se_session *sqa_alloc_sesess(scsi_qla_host_t *vha) { struct se_session *se_sess; + /* - * The following is open coded from: - * - * target_core_transport:transport_init_session() - * * For now we simply allocate a single page to hold the session * structure. This needs to be modified to use the slab cache. */ - se_sess = kzalloc(sizeof(*se_sess), GFP_KERNEL); - if (!se_sess) - return NULL; - - INIT_LIST_HEAD(&se_sess->sess_list); - INIT_LIST_HEAD(&se_sess->sess_acl_list); - INIT_LIST_HEAD(&se_sess->sess_cmd_list); - spin_lock_init(&se_sess->sess_cmd_lock); - - return se_sess; + return kzalloc(sizeof(*se_sess), GFP_KERNEL); } static void sqa_free_sesess(struct se_session *se_sess)