[SCSI] fnic: potential dead lock in fnic_is_abts_pending()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 30 May 2013 07:50:46 +0000 (10:50 +0300)
committerJames Bottomley <JBottomley@Parallels.com>
Thu, 27 Jun 2013 00:41:44 +0000 (17:41 -0700)
There is an unlock missing if the == FNIC_IOREQ_ABTS_PENDING is
false.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Hiral Patel <hiralpat@cisco.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/fnic/fnic_scsi.c

index be99e7549d891a011c75033ae0c0c535385a4260..a97e6e584f8cfed52b9ef8dd8dd65b006b605558 100644 (file)
@@ -2432,11 +2432,9 @@ int fnic_is_abts_pending(struct fnic *fnic, struct scsi_cmnd *lr_sc)
                              "Found IO in %s on lun\n",
                              fnic_ioreq_state_to_str(CMD_STATE(sc)));
 
-               if (CMD_STATE(sc) == FNIC_IOREQ_ABTS_PENDING) {
-                       spin_unlock_irqrestore(io_lock, flags);
+               if (CMD_STATE(sc) == FNIC_IOREQ_ABTS_PENDING)
                        ret = 1;
-                       continue;
-               }
+               spin_unlock_irqrestore(io_lock, flags);
        }
 
        return ret;