]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - block/blk-core.c
block: add REQ_FLUSH_SEQ
[karo-tx-linux.git] / block / blk-core.c
index 4ce953f1b3909f38f213adcc0a39251a34875330..fc7d8ad76f440916e1fa2c00ebd9550d51833829 100644 (file)
@@ -136,7 +136,7 @@ static void req_bio_endio(struct request *rq, struct bio *bio,
 {
        struct request_queue *q = rq->q;
 
-       if (&q->flush_rq != rq) {
+       if (!(rq->cmd_flags & REQ_FLUSH_SEQ)) {
                if (error)
                        clear_bit(BIO_UPTODATE, &bio->bi_flags);
                else if (!test_bit(BIO_UPTODATE, &bio->bi_flags))
@@ -1789,7 +1789,7 @@ static void blk_account_io_done(struct request *req)
         * normal IO on queueing nor completion.  Accounting the
         * containing request is enough.
         */
-       if (blk_do_io_stat(req) && req != &req->q->flush_rq) {
+       if (blk_do_io_stat(req) && !(req->cmd_flags & REQ_FLUSH_SEQ)) {
                unsigned long duration = jiffies - req->start_time;
                const int rw = rq_data_dir(req);
                struct hd_struct *part;