[PATCH] scsi_requeuest_fn
Okay, when doing some other stuff I looked over this one, and it's a bit confusing to read: - using a goto completed where a simple break would be sufficient - using for (;;) for a perfectly fine while loop - ... but what's more interesting is that the spinlock handling in here, when we switch from sdev_lock/queue_lock to host_lock we do a spin_unlock_irq followed by a spin_lock_irqsave - but we we just enabled interrupts so the save isn't nessecary at all, even more we can just do spin_unlock/spin_lock when keeping them disabled. Also we drop host_lock in the middle of this function, just to reacquire it a tad later in scsi_dispatch_cmd, but fixing that need a bit more thinking as there's another caller for scsi_dispatch_cmd.
Showing
Please register or sign in to comment