]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - block/elevator.c
[ALSA] hda-codec - Make internal speaker work on Acer C20x tablets
[linux-2.6-omap-h63xx.git] / block / elevator.c
index 62c7a3069d3a20981067e1865c77be04a3990847..f6dafa8c7c4d03bea2522125895bf43579480cb9 100644 (file)
@@ -82,7 +82,7 @@ inline int elv_rq_merge_ok(struct request *rq, struct bio *bio)
        /*
         * must be same device and not a special request
         */
-       if (rq->rq_disk != bio->bi_bdev->bd_disk || !rq->special)
+       if (rq->rq_disk != bio->bi_bdev->bd_disk || rq->special)
                return 0;
 
        if (!elv_iosched_allow_merge(rq, bio))
@@ -590,6 +590,12 @@ void elv_insert(request_queue_t *q, struct request *rq, int where)
                 */
                rq->cmd_flags |= REQ_SOFTBARRIER;
 
+               /*
+                * Most requeues happen because of a busy condition,
+                * don't force unplug of the queue for that case.
+                */
+               unplug_it = 0;
+
                if (q->ordseq == 0) {
                        list_add(&rq->queuelist, &q->queue_head);
                        break;
@@ -604,11 +610,6 @@ void elv_insert(request_queue_t *q, struct request *rq, int where)
                }
 
                list_add_tail(&rq->queuelist, pos);
-               /*
-                * most requeues happen because of a busy condition, don't
-                * force unplug of the queue for that case.
-                */
-               unplug_it = 0;
                break;
 
        default: