diff options
-rw-r--r-- | block/cfq-iosched.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 4b4217d9be78..07b706243772 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -577,9 +577,9 @@ static int cfq_allow_merge(request_queue_t *q, struct request *rq, | |||
577 | pid_t key; | 577 | pid_t key; |
578 | 578 | ||
579 | /* | 579 | /* |
580 | * Disallow merge, if bio and rq aren't both sync or async | 580 | * Disallow merge of a sync bio into an async request. |
581 | */ | 581 | */ |
582 | if (!!bio_sync(bio) != !!rq_is_sync(rq)) | 582 | if ((bio_data_dir(bio) == READ || bio_sync(bio)) && !rq_is_sync(rq)) |
583 | return 0; | 583 | return 0; |
584 | 584 | ||
585 | /* | 585 | /* |
@@ -592,7 +592,7 @@ static int cfq_allow_merge(request_queue_t *q, struct request *rq, | |||
592 | if (cfqq == RQ_CFQQ(rq)) | 592 | if (cfqq == RQ_CFQQ(rq)) |
593 | return 1; | 593 | return 1; |
594 | 594 | ||
595 | return 1; | 595 | return 0; |
596 | } | 596 | } |
597 | 597 | ||
598 | static inline void | 598 | static inline void |