ibmvfc: prevent a potential deadlock

My static checker complains that we need to unlock on this path.  Seems
true.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Brian King <brking@linux.vnet.ibm.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Dan Carpenter 2016-07-15 14:18:57 +03:00 committed by Martin K. Petersen
parent 866d372e86
commit 0073887ae5
1 changed files with 2 additions and 0 deletions

View File

@ -4722,6 +4722,8 @@ static void ibmvfc_rport_add_thread(struct work_struct *work)
tgt_dbg(tgt, "Setting rport roles\n");
fc_remote_port_rolechg(rport, tgt->ids.roles);
put_device(&rport->dev);
} else {
spin_unlock_irqrestore(vhost->host->host_lock, flags);
}
kref_put(&tgt->kref, ibmvfc_release_tgt);