@@ -146,8 +146,8 @@ void blk_dump_rq_flags(struct request *rq, char *msg)
146146 printk (KERN_INFO " sector %llu, nr/cnr %u/%u\n" ,
147147 (unsigned long long )blk_rq_pos (rq ),
148148 blk_rq_sectors (rq ), blk_rq_cur_sectors (rq ));
149- printk (KERN_INFO " bio %p, biotail %p, buffer %p, len %u\n" ,
150- rq -> bio , rq -> biotail , rq -> buffer , blk_rq_bytes (rq ));
149+ printk (KERN_INFO " bio %p, biotail %p, len %u\n" ,
150+ rq -> bio , rq -> biotail , blk_rq_bytes (rq ));
151151
152152 if (rq -> cmd_type == REQ_TYPE_BLOCK_PC ) {
153153 printk (KERN_INFO " cdb: " );
@@ -1360,7 +1360,6 @@ void blk_add_request_payload(struct request *rq, struct page *page,
13601360
13611361 rq -> __data_len = rq -> resid_len = len ;
13621362 rq -> nr_phys_segments = 1 ;
1363- rq -> buffer = bio_data (bio );
13641363}
13651364EXPORT_SYMBOL_GPL (blk_add_request_payload );
13661365
@@ -1402,12 +1401,6 @@ bool bio_attempt_front_merge(struct request_queue *q, struct request *req,
14021401 bio -> bi_next = req -> bio ;
14031402 req -> bio = bio ;
14041403
1405- /*
1406- * may not be valid. if the low level driver said
1407- * it didn't need a bounce buffer then it better
1408- * not touch req->buffer either...
1409- */
1410- req -> buffer = bio_data (bio );
14111404 req -> __sector = bio -> bi_iter .bi_sector ;
14121405 req -> __data_len += bio -> bi_iter .bi_size ;
14131406 req -> ioprio = ioprio_best (req -> ioprio , bio_prio (bio ));
@@ -2434,7 +2427,6 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes)
24342427 }
24352428
24362429 req -> __data_len -= total_bytes ;
2437- req -> buffer = bio_data (req -> bio );
24382430
24392431 /* update sector only for requests with clear definition of sector */
24402432 if (req -> cmd_type == REQ_TYPE_FS )
@@ -2752,10 +2744,9 @@ void blk_rq_bio_prep(struct request_queue *q, struct request *rq,
27522744 /* Bit 0 (R/W) is identical in rq->cmd_flags and bio->bi_rw */
27532745 rq -> cmd_flags |= bio -> bi_rw & REQ_WRITE ;
27542746
2755- if (bio_has_data (bio )) {
2747+ if (bio_has_data (bio ))
27562748 rq -> nr_phys_segments = bio_phys_segments (q , bio );
2757- rq -> buffer = bio_data (bio );
2758- }
2749+
27592750 rq -> __data_len = bio -> bi_iter .bi_size ;
27602751 rq -> bio = rq -> biotail = bio ;
27612752
@@ -2831,7 +2822,7 @@ EXPORT_SYMBOL_GPL(blk_rq_unprep_clone);
28312822
28322823/*
28332824 * Copy attributes of the original request to the clone request.
2834- * The actual data parts (e.g. ->cmd, ->buffer, -> sense) are not copied.
2825+ * The actual data parts (e.g. ->cmd, ->sense) are not copied.
28352826 */
28362827static void __blk_rq_prep_clone (struct request * dst , struct request * src )
28372828{
@@ -2857,7 +2848,7 @@ static void __blk_rq_prep_clone(struct request *dst, struct request *src)
28572848 *
28582849 * Description:
28592850 * Clones bios in @rq_src to @rq, and copies attributes of @rq_src to @rq.
2860- * The actual data parts of @rq_src (e.g. ->cmd, ->buffer, -> sense)
2851+ * The actual data parts of @rq_src (e.g. ->cmd, ->sense)
28612852 * are not copied, and copying such parts is the caller's responsibility.
28622853 * Also, pages which the original bios are pointing to are not copied
28632854 * and the cloned bios just point same pages.
0 commit comments