Skip to contentSkip to conversation

Add missing spin_unlock_irq to ide.c (244ac16)

PATCH In review Rasmus Andersen 2 participants 3 messages May 25, 2001

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add missing spin_unlock_irq to ide.c (244ac16)

(I forgot to cc l-k on this one when it went to andre.)

Hi.

This patch adds a spin_unlock_irqsave to ide_spin_wait_hwgroup as reported by the Stanford team way back. It applies against 244ac16.

drivers/ide/ide.c +2 -0
@@ -2362,6 +2362,8 @@
 		__restore_flags(lflags);	/* local CPU only */
 		spin_lock_irq(&io_request_lock);
 	}
+
+        spin_unlock_irq(&io_request_lock);
 	return 0;
 }
 
Signature · 1 line
        Rasmus([email protected])
#1 lore raw
Quoted 11 lines · Rasmus Andersen

(I forgot to cc l-k on this one when it went to andre.)

Hi.

This patch adds a spin_unlock_irqsave to ide_spin_wait_hwgroup as reported by the Stanford team way back. It applies against 244ac16.

drivers/ide/ide.c line 2368

Quoted 7 lines
drivers/ide/ide.c +2 -0
@@ -2362,6 +2362,8 @@
 		__restore_flags(lflags);	/* local CPU only */
 		spin_lock_irq(&io_request_lock);
 	}
+
+        spin_unlock_irq(&io_request_lock);
 	return 0;
 }

This isn't right. Granted the locking isn't straight forward here, but take a look at ide_write_setting -> ide_spin_wait_hwgroup and the latters return value.

BTW, also try and follow local style when making such changes.

Signature · 1 line
Jens Axboe
#2 lore raw
In reply to Rasmus Andersen

On Fri, May 25, 2001 at 11:11:23PM +0200, Jens Axboe wrote:
[...]

Quoted 3 lines

This isn't right. Granted the locking isn't straight forward here, but take a look at ide_write_setting -> ide_spin_wait_hwgroup and the latters return value.

Yes, Andre set me straight here. My apologies for being lazy and not checking the call path.

Signature · 5 lines
        Rasmus([email protected])

You know how dumb the average guy is?  Well, by  definition, half
of them are even dumber than that.
            -- J.R. "Bob" Dobbs