]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - block/cfq-iosched.c
[IA64] kexec: Fix CONFIG_SMP=n compilation
[linux-2.6-omap-h63xx.git] / block / cfq-iosched.c
index 4b4217d9be787877277e0b479e6c5a85879fe9db..07b706243772e46fe2434248bf0e4fba938fca0a 100644 (file)
@@ -577,9 +577,9 @@ static int cfq_allow_merge(request_queue_t *q, struct request *rq,
        pid_t key;
 
        /*
-        * Disallow merge, if bio and rq aren't both sync or async
+        * Disallow merge of a sync bio into an async request.
         */
-       if (!!bio_sync(bio) != !!rq_is_sync(rq))
+       if ((bio_data_dir(bio) == READ || bio_sync(bio)) && !rq_is_sync(rq))
                return 0;
 
        /*
@@ -592,7 +592,7 @@ static int cfq_allow_merge(request_queue_t *q, struct request *rq,
        if (cfqq == RQ_CFQQ(rq))
                return 1;
 
-       return 1;
+       return 0;
 }
 
 static inline void