Skip to contentSkip to conversation

SCSI: target: change lock to unlock

PATCH Superseded Dan Carpenter 2 participants 2 messages Jun 13, 2011 – Jun 15, 2011

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 2/4 SCSI: target: change lock to unlock

There is a typo here, it should be an unlock instead of a lock. The original code will deadlock.

drivers/target/tcm_fc/tfc_sess.c +1 -1
index 03744c2..7491e21 100644
@@ -332,7 +332,7 @@ void ft_sess_close(struct se_session *se_sess)
 	lport = sess->tport->lport;
 	port_id = sess->port_id;
 	if (port_id = -1) {
-		mutex_lock(&ft_lport_lock);
+		mutex_unlock(&ft_lport_lock);
 		return;
 	}
 	FT_SESS_DBG("port_id %x\n", port_id);
#1 lore raw
Quoted 5 lines · Dan Carpenter

There is a typo here, it should be an unlock instead of a lock. The original code will deadlock.

Committed as 3370a334b40 with a 'tcm_fc:' prefix for the commit message.

Thanks Dan!

--nab

Quoted 13 lines
drivers/target/tcm_fc/tfc_sess.c +1 -1
index 03744c2..7491e21 100644
@@ -332,7 +332,7 @@ void ft_sess_close(struct se_session *se_sess)
 	lport = sess->tport->lport;
 	port_id = sess->port_id;
 	if (port_id = -1) {
-		mutex_lock(&ft_lport_lock);
+		mutex_unlock(&ft_lport_lock);
 		return;
 	}
 	FT_SESS_DBG("port_id %x\n", port_id);