On Thu, 4 Mar 2010, Hugh Daschbach wrote: > I have added get_device()/put_device() to ensure there's the device > hasn't fully disappeared before calling list_del_init(). Is this > needed? Yes, it is. In fact, it's necessary to insure the device doesn't disappear before you call the shutdown routines! > If so, there's "might_sleep()" commented out in put_device(). > Do I need to release the lock before calling put_device()? A better approach might be to do the list_del_init() while still holding the initial spinlock, before you call the shutdown methods. Then do the put_device() before reacquiring the spinlock at the end of the loop. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html