]> git.neil.brown.name Git - history.git/commitdiff
Import 2.3.47pre3 2.3.47pre3
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:31:46 +0000 (15:31 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:31:46 +0000 (15:31 -0500)
drivers/scsi/scsi_lib.c

index a8c7c96137cb799c49f0fbafb57be6a7c9afff69..2438aecc6769040ce87c87c9d540273d23a952bc 100644 (file)
@@ -165,8 +165,7 @@ int scsi_insert_special_req(Scsi_Request * SRpnt, int at_head)
        spin_lock_irqsave(&io_request_lock, flags);
 
        if (at_head) {
-               SRpnt->sr_request.next = q->current_request;
-               q->current_request = &SRpnt->sr_request;
+               list_add(&SRpnt->sr_request.queue, &q->queue_head);
        } else {
                /*
                 * FIXME(eric) - we always insert at the tail of the
@@ -176,19 +175,7 @@ int scsi_insert_special_req(Scsi_Request * SRpnt, int at_head)
                 * request might not float high enough in the queue
                 * to be scheduled.
                 */
-               SRpnt->sr_request.next = NULL;
-               if (q->current_request == NULL) {
-                       q->current_request = &SRpnt->sr_request;
-               } else {
-                       struct request *req;
-
-                       for (req = q->current_request; req; req = req->next) {
-                               if (req->next == NULL) {
-                                       req->next = &SRpnt->sr_request;
-                                       break;
-                               }
-                       }
-               }
+               list_add_tail(&SRpnt->sr_request.queue, &q->queue_head);
        }
 
        /*