block: fold cmd_type into the REQ_OP_ space
[GitHub/LineageOS/android_kernel_motorola_exynos9610.git] / block / bio.c
index 2b375020fc49bab0bfcabda4fc3d16118b5f1512..9a2dd7145e83b3a1d2dab269113a8dbbd6bbdc5c 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,12 +1391,6 @@ 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);
 
        /*
@@ -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;