Skip to content

Commit

Permalink
[SCSI] be2iscsi: Fix for a possible udelay while holding lock
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jayamohan Kallickal authored and James Bottomley committed Mar 3, 2010
1 parent 4183122 commit 944b2fb
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions drivers/scsi/be2iscsi/be_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
Expand Down

0 comments on commit 944b2fb

Please sign in to comment.