scsi: cxlflash: Avoid double mutex unlock
authorMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
Fri, 25 Aug 2017 22:18:03 +0000 (17:18 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 25 Aug 2017 22:23:34 +0000 (18:23 -0400)
commit1a9e394154e34728f58c1f697b993aaaf89a4db2
treeb2df6f5402857384d239733478641e32d0333642
parent48a17ad5931c3832eec68411620bc3527021c193
scsi: cxlflash: Avoid double mutex unlock

The AFU recovery routine uses an interruptible mutex to control the flow
of in-flight recoveries. Upon receiving an interruptible signal the code
branches to a common exit path which wrongly assumes the mutex is
held. Add a local variable to track when the mutex should be unlocked.

Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/cxlflash/superpipe.c