Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / block / blk-map.c
index 27fd8d9..0acb664 100644 (file)
@@ -16,6 +16,8 @@
 int blk_rq_append_bio(struct request *rq, struct bio *bio)
 {
        if (!rq->bio) {
+               rq->cmd_flags &= REQ_OP_MASK;
+               rq->cmd_flags |= (bio->bi_opf & REQ_OP_MASK);
                blk_rq_bio_prep(rq->q, rq, bio);
        } else {
                if (!ll_back_merge_fn(rq->q, rq, bio))
@@ -138,7 +140,7 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,
        } while (iov_iter_count(&i));
 
        if (!bio_flagged(bio, BIO_USER_MAPPED))
-               rq->cmd_flags |= REQ_COPY_USER;
+               rq->rq_flags |= RQF_COPY_USER;
        return 0;
 
 unmap_rq:
@@ -236,7 +238,7 @@ int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf,
                bio_set_op_attrs(bio, REQ_OP_WRITE, 0);
 
        if (do_copy)
-               rq->cmd_flags |= REQ_COPY_USER;
+               rq->rq_flags |= RQF_COPY_USER;
 
        ret = blk_rq_append_bio(rq, bio);
        if (unlikely(ret)) {