]> git.neil.brown.name Git - history.git/commitdiff
[SCSI] add commands at the tail of cmd_list
authorLuben Tuikov <luben@splentec.com>
Sun, 9 Feb 2003 04:56:35 +0000 (22:56 -0600)
committerJames Bottomley <jejb@raven.il.steeleye.com>
Sun, 9 Feb 2003 04:56:35 +0000 (22:56 -0600)
It's probably going to be a fifo, so it should be more efficient
for taking them off again

drivers/scsi/scsi.c

index 3d15efce2b9b9c2dc6f4f130500b46e8b671e60e..2279de4782761474bc843b7a533b3783ef486761 100644 (file)
@@ -412,7 +412,7 @@ struct scsi_cmnd *scsi_get_command(struct scsi_device *dev, int gfp_mask)
                init_timer(&cmd->eh_timeout);
                INIT_LIST_HEAD(&cmd->list);
                spin_lock_irqsave(&dev->list_lock, flags);
-               list_add(&dev->cmd_list, &cmd->list);
+               list_add_tail(&cmd->list, &dev->cmd_list);
                spin_unlock_irqrestore(&dev->list_lock, flags);
        }