]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - block/bio.c
Merge branch 'for-4.11/next' into for-4.11/linus-merge
[karo-tx-linux.git] / block / bio.c
index 2b375020fc49bab0bfcabda4fc3d16118b5f1512..4b564d0c3e29a4c15becf545a996794b296ae622 100644 (file)
@@ -1227,9 +1227,6 @@ struct bio *bio_copy_user_iov(struct request_queue *q,
        if (!bio)
                goto out_bmd;
 
-       if (iter->type & WRITE)
-               bio_set_op_attrs(bio, REQ_OP_WRITE, 0);
-
        ret = 0;
 
        if (map_data) {
@@ -1394,16 +1391,10 @@ struct bio *bio_map_user_iov(struct request_queue *q,
 
        kfree(pages);
 
-       /*
-        * set data direction, and check if mapped pages need bouncing
-        */
-       if (iter->type & WRITE)
-               bio_set_op_attrs(bio, REQ_OP_WRITE, 0);
-
        bio_set_flag(bio, BIO_USER_MAPPED);
 
        /*
-        * subtle -- if __bio_map_user() ended up bouncing a bio,
+        * subtle -- if bio_map_user_iov() ended up bouncing a bio,
         * it would normally disappear when its bi_end_io is run.
         * however, we need it for the unmap, so grab an extra
         * reference to it
@@ -1445,8 +1436,8 @@ static void __bio_unmap_user(struct bio *bio)
  *     bio_unmap_user  -       unmap a bio
  *     @bio:           the bio being unmapped
  *
- *     Unmap a bio previously mapped by bio_map_user(). Must be called with
- *     process context.
+ *     Unmap a bio previously mapped by bio_map_user_iov(). Must be called from
+ *     process context.
  *
  *     bio_unmap_user() may sleep.
  */
@@ -1590,7 +1581,6 @@ struct bio *bio_copy_kern(struct request_queue *q, void *data, unsigned int len,
                bio->bi_private = data;
        } else {
                bio->bi_end_io = bio_copy_kern_endio;
-               bio_set_op_attrs(bio, REQ_OP_WRITE, 0);
        }
 
        return bio;