block: initialize flush request with WRITE_FLUSH instead of REQ_FLUSH
authorTejun Heo <tj@kernel.org>
Fri, 3 Sep 2010 09:56:17 +0000 (11:56 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Fri, 10 Sep 2010 10:35:37 +0000 (12:35 +0200)
init_flush_request() only set REQ_FLUSH when initializing flush
requests making them READ requests.  Use WRITE_FLUSH instead.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block/blk-flush.c

index 72905f862d31b79ff79d80045c8a450845c26713..f357f1fc411c77ed89fe8eac3c8829d38ac9002b 100644 (file)
@@ -77,7 +77,7 @@ static void post_flush_end_io(struct request *rq, int error)
 static void init_flush_request(struct request *rq, struct gendisk *disk)
 {
        rq->cmd_type = REQ_TYPE_FS;
-       rq->cmd_flags = REQ_FLUSH;
+       rq->cmd_flags = WRITE_FLUSH;
        rq->rq_disk = disk;
 }