scst: Don't specify a LUN when issuingSCST_UNREG_SESS_TM

The LUN argument is ignored while processing SCST_UNREG_SESS_TM, so don't
pass LUN information when issuing that task management function.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4170 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2012-03-27 01:43:28 +00:00
parent 90670b1c83
commit 62cc777905
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -2888,7 +2888,7 @@ static inline int scst_rx_mgmt_fn_lun(struct scst_session *sess, int fn,
params.fn = fn;
params.lun = lun;
params.lun_len = lun_len;
params.lun_set = 1;
params.lun_set = !!lun;
params.atomic = atomic;
params.tgt_priv = tgt_priv;
return scst_rx_mgmt_fn(sess, &params);
+3 -3
View File
@@ -5953,6 +5953,7 @@ int scst_rx_mgmt_fn(struct scst_session *sess,
case SCST_TARGET_RESET:
case SCST_ABORT_ALL_TASKS:
case SCST_NEXUS_LOSS:
case SCST_UNREG_SESS_TM:
break;
default:
sBUG_ON(!params->lun_set);
@@ -6472,7 +6473,7 @@ void scst_unregister_session(struct scst_session *sess, int wait,
{
unsigned long flags;
DECLARE_COMPLETION_ONSTACK(c);
int rc, lun;
int rc;
TRACE_ENTRY();
@@ -6481,9 +6482,8 @@ void scst_unregister_session(struct scst_session *sess, int wait,
sess->unreg_done_fn = unreg_done_fn;
/* Abort all outstanding commands and clear reservation, if necessary */
lun = 0;
rc = scst_rx_mgmt_fn_lun(sess, SCST_UNREG_SESS_TM,
&lun, sizeof(lun), SCST_ATOMIC, NULL);
NULL, 0, SCST_ATOMIC, NULL);
if (rc != 0) {
PRINT_ERROR("SCST_UNREG_SESS_TM failed %d (sess %p)",
rc, sess);