[SCSI] be2iscsi: Fix for a possible udelay while holding lock
authorJayamohan Kallickal <jayamohank@serverengines.com>
Sat, 20 Feb 2010 02:33:24 +0000 (08:03 +0530)
committerJames Bottomley <James.Bottomley@suse.de>
Wed, 3 Mar 2010 12:10:04 +0000 (17:40 +0530)
This patch fixes a situation where we could call udelay
while holding spin_lock

Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/be2iscsi/be_cmds.c

index 67098578fba480f423d1007288c8be5df5f2eb6b..cda6642c7368806e2492fc9402f0c67382a6ce62 100644 (file)
@@ -32,18 +32,11 @@ void be_mcc_notify(struct beiscsi_hba *phba)
 unsigned int alloc_mcc_tag(struct beiscsi_hba *phba)
 {
        unsigned int tag = 0;
-       unsigned int num = 0;
 
-mcc_tag_rdy:
        if (phba->ctrl.mcc_tag_available) {
                tag = phba->ctrl.mcc_tag[phba->ctrl.mcc_alloc_index];
                phba->ctrl.mcc_tag[phba->ctrl.mcc_alloc_index] = 0;
                phba->ctrl.mcc_numtag[tag] = 0;
-       } else {
-               udelay(100);
-               num++;
-               if (num < mcc_timeout)
-                       goto mcc_tag_rdy;
        }
        if (tag) {
                phba->ctrl.mcc_tag_available--;