Commit 1fd459e3 authored by Mike Christie's avatar Mike Christie Committed by

[SCSI] iscsi update: rm conn lock

>From erezz@voltaire.com:

rm conn->lock since it is not used anymore. The dataqueue is protected
by the session lock and xmitmutex.
Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarAlex Aizman <itn780@yahoo.com>
Signed-off-by: default avatarDmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent ee7f8e40
...@@ -244,12 +244,10 @@ iscsi_ctask_cleanup(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) ...@@ -244,12 +244,10 @@ iscsi_ctask_cleanup(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask)
if (sc->sc_data_direction == DMA_TO_DEVICE) { if (sc->sc_data_direction == DMA_TO_DEVICE) {
struct iscsi_data_task *dtask, *n; struct iscsi_data_task *dtask, *n;
/* WRITE: cleanup Data-Out's if any */ /* WRITE: cleanup Data-Out's if any */
spin_lock(&conn->lock);
list_for_each_entry_safe(dtask, n, &ctask->dataqueue, item) { list_for_each_entry_safe(dtask, n, &ctask->dataqueue, item) {
list_del(&dtask->item); list_del(&dtask->item);
mempool_free(dtask, ctask->datapool); mempool_free(dtask, ctask->datapool);
} }
spin_unlock(&conn->lock);
} }
ctask->xmstate = XMSTATE_IDLE; ctask->xmstate = XMSTATE_IDLE;
ctask->r2t = NULL; ctask->r2t = NULL;
...@@ -2453,8 +2451,6 @@ iscsi_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx) ...@@ -2453,8 +2451,6 @@ iscsi_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx)
conn->data_size = DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH; conn->data_size = DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH;
conn->max_recv_dlength = DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH; conn->max_recv_dlength = DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH;
spin_lock_init(&conn->lock);
/* initialize general xmit PDU commands queue */ /* initialize general xmit PDU commands queue */
conn->xmitqueue = kfifo_alloc(session->cmds_max * sizeof(void*), conn->xmitqueue = kfifo_alloc(session->cmds_max * sizeof(void*),
GFP_KERNEL, NULL); GFP_KERNEL, NULL);
......
...@@ -146,7 +146,6 @@ struct iscsi_conn { ...@@ -146,7 +146,6 @@ struct iscsi_conn {
struct iscsi_mgmt_task *login_mtask; /* mtask used for login/text */ struct iscsi_mgmt_task *login_mtask; /* mtask used for login/text */
struct iscsi_mgmt_task *mtask; /* xmit mtask in progress */ struct iscsi_mgmt_task *mtask; /* xmit mtask in progress */
struct iscsi_cmd_task *ctask; /* xmit ctask in progress */ struct iscsi_cmd_task *ctask; /* xmit ctask in progress */
spinlock_t lock; /* FIXME: to be removed */
/* old values for socket callbacks */ /* old values for socket callbacks */
void (*old_data_ready)(struct sock *, int); void (*old_data_ready)(struct sock *, int);
......
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