diff options
| -rw-r--r-- | block/blk-core.c | 21 | ||||
| -rw-r--r-- | block/blk-map.c | 3 | ||||
| -rw-r--r-- | drivers/block/amiflop.c | 2 | ||||
| -rw-r--r-- | drivers/block/ataflop.c | 2 | ||||
| -rw-r--r-- | drivers/block/floppy.c | 18 | ||||
| -rw-r--r-- | drivers/block/hd.c | 10 | ||||
| -rw-r--r-- | drivers/block/mg_disk.c | 12 | ||||
| -rw-r--r-- | drivers/block/paride/pcd.c | 2 | ||||
| -rw-r--r-- | drivers/block/paride/pd.c | 4 | ||||
| -rw-r--r-- | drivers/block/paride/pf.c | 4 | ||||
| -rw-r--r-- | drivers/block/skd_main.c | 5 | ||||
| -rw-r--r-- | drivers/block/swim.c | 2 | ||||
| -rw-r--r-- | drivers/block/swim3.c | 6 | ||||
| -rw-r--r-- | drivers/block/xen-blkfront.c | 4 | ||||
| -rw-r--r-- | drivers/block/xsysace.c | 4 | ||||
| -rw-r--r-- | drivers/block/z2ram.c | 6 | ||||
| -rw-r--r-- | drivers/ide/ide-disk.c | 5 | ||||
| -rw-r--r-- | drivers/md/dm.c | 1 | ||||
| -rw-r--r-- | drivers/mtd/mtd_blkdevs.c | 3 | ||||
| -rw-r--r-- | drivers/mtd/ubi/block.c | 2 | ||||
| -rw-r--r-- | drivers/scsi/scsi_lib.c | 3 | ||||
| -rw-r--r-- | drivers/scsi/sd.c | 10 | ||||
| -rw-r--r-- | include/linux/blkdev.h | 1 |
23 files changed, 55 insertions, 75 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 1fe9ff6e6802..ae6227fd07aa 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
| @@ -146,8 +146,8 @@ void blk_dump_rq_flags(struct request *rq, char *msg) | |||
| 146 | printk(KERN_INFO " sector %llu, nr/cnr %u/%u\n", | 146 | printk(KERN_INFO " sector %llu, nr/cnr %u/%u\n", |
| 147 | (unsigned long long)blk_rq_pos(rq), | 147 | (unsigned long long)blk_rq_pos(rq), |
| 148 | blk_rq_sectors(rq), blk_rq_cur_sectors(rq)); | 148 | blk_rq_sectors(rq), blk_rq_cur_sectors(rq)); |
| 149 | printk(KERN_INFO " bio %p, biotail %p, buffer %p, len %u\n", | 149 | printk(KERN_INFO " bio %p, biotail %p, len %u\n", |
| 150 | rq->bio, rq->biotail, rq->buffer, blk_rq_bytes(rq)); | 150 | rq->bio, rq->biotail, blk_rq_bytes(rq)); |
| 151 | 151 | ||
| 152 | if (rq->cmd_type == REQ_TYPE_BLOCK_PC) { | 152 | if (rq->cmd_type == REQ_TYPE_BLOCK_PC) { |
| 153 | printk(KERN_INFO " cdb: "); | 153 | printk(KERN_INFO " cdb: "); |
| @@ -1360,7 +1360,6 @@ void blk_add_request_payload(struct request *rq, struct page *page, | |||
| 1360 | 1360 | ||
| 1361 | rq->__data_len = rq->resid_len = len; | 1361 | rq->__data_len = rq->resid_len = len; |
| 1362 | rq->nr_phys_segments = 1; | 1362 | rq->nr_phys_segments = 1; |
| 1363 | rq->buffer = bio_data(bio); | ||
| 1364 | } | 1363 | } |
| 1365 | EXPORT_SYMBOL_GPL(blk_add_request_payload); | 1364 | EXPORT_SYMBOL_GPL(blk_add_request_payload); |
| 1366 | 1365 | ||
| @@ -1402,12 +1401,6 @@ bool bio_attempt_front_merge(struct request_queue *q, struct request *req, | |||
| 1402 | bio->bi_next = req->bio; | 1401 | bio->bi_next = req->bio; |
| 1403 | req->bio = bio; | 1402 | req->bio = bio; |
| 1404 | 1403 | ||
| 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); | ||
| 1411 | req->__sector = bio->bi_iter.bi_sector; | 1404 | req->__sector = bio->bi_iter.bi_sector; |
| 1412 | req->__data_len += bio->bi_iter.bi_size; | 1405 | req->__data_len += bio->bi_iter.bi_size; |
| 1413 | req->ioprio = ioprio_best(req->ioprio, bio_prio(bio)); | 1406 | 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) | |||
| 2434 | } | 2427 | } |
| 2435 | 2428 | ||
| 2436 | req->__data_len -= total_bytes; | 2429 | req->__data_len -= total_bytes; |
| 2437 | req->buffer = bio_data(req->bio); | ||
| 2438 | 2430 | ||
| 2439 | /* update sector only for requests with clear definition of sector */ | 2431 | /* update sector only for requests with clear definition of sector */ |
| 2440 | if (req->cmd_type == REQ_TYPE_FS) | 2432 | if (req->cmd_type == REQ_TYPE_FS) |
| @@ -2752,10 +2744,9 @@ void blk_rq_bio_prep(struct request_queue *q, struct request *rq, | |||
| 2752 | /* Bit 0 (R/W) is identical in rq->cmd_flags and bio->bi_rw */ | 2744 | /* Bit 0 (R/W) is identical in rq->cmd_flags and bio->bi_rw */ |
| 2753 | rq->cmd_flags |= bio->bi_rw & REQ_WRITE; | 2745 | rq->cmd_flags |= bio->bi_rw & REQ_WRITE; |
| 2754 | 2746 | ||
| 2755 | if (bio_has_data(bio)) { | 2747 | if (bio_has_data(bio)) |
| 2756 | rq->nr_phys_segments = bio_phys_segments(q, bio); | 2748 | rq->nr_phys_segments = bio_phys_segments(q, bio); |
| 2757 | rq->buffer = bio_data(bio); | 2749 | |
| 2758 | } | ||
| 2759 | rq->__data_len = bio->bi_iter.bi_size; | 2750 | rq->__data_len = bio->bi_iter.bi_size; |
| 2760 | rq->bio = rq->biotail = bio; | 2751 | rq->bio = rq->biotail = bio; |
| 2761 | 2752 | ||
| @@ -2831,7 +2822,7 @@ EXPORT_SYMBOL_GPL(blk_rq_unprep_clone); | |||
| 2831 | 2822 | ||
| 2832 | /* | 2823 | /* |
| 2833 | * Copy attributes of the original request to the clone request. | 2824 | * 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. |
| 2835 | */ | 2826 | */ |
| 2836 | static void __blk_rq_prep_clone(struct request *dst, struct request *src) | 2827 | static void __blk_rq_prep_clone(struct request *dst, struct request *src) |
| 2837 | { | 2828 | { |
| @@ -2857,7 +2848,7 @@ static void __blk_rq_prep_clone(struct request *dst, struct request *src) | |||
| 2857 | * | 2848 | * |
| 2858 | * Description: | 2849 | * Description: |
| 2859 | * Clones bios in @rq_src to @rq, and copies attributes of @rq_src to @rq. | 2850 | * 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) |
| 2861 | * are not copied, and copying such parts is the caller's responsibility. | 2852 | * are not copied, and copying such parts is the caller's responsibility. |
| 2862 | * Also, pages which the original bios are pointing to are not copied | 2853 | * Also, pages which the original bios are pointing to are not copied |
| 2863 | * and the cloned bios just point same pages. | 2854 | * and the cloned bios just point same pages. |
diff --git a/block/blk-map.c b/block/blk-map.c index f7b22bc21518..f890d4345b0c 100644 --- a/block/blk-map.c +++ b/block/blk-map.c | |||
| @@ -155,7 +155,6 @@ int blk_rq_map_user(struct request_queue *q, struct request *rq, | |||
| 155 | if (!bio_flagged(bio, BIO_USER_MAPPED)) | 155 | if (!bio_flagged(bio, BIO_USER_MAPPED)) |
| 156 | rq->cmd_flags |= REQ_COPY_USER; | 156 | rq->cmd_flags |= REQ_COPY_USER; |
| 157 | 157 | ||
| 158 | rq->buffer = NULL; | ||
| 159 | return 0; | 158 | return 0; |
| 160 | unmap_rq: | 159 | unmap_rq: |
| 161 | blk_rq_unmap_user(bio); | 160 | blk_rq_unmap_user(bio); |
| @@ -238,7 +237,6 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq, | |||
| 238 | blk_queue_bounce(q, &bio); | 237 | blk_queue_bounce(q, &bio); |
| 239 | bio_get(bio); | 238 | bio_get(bio); |
| 240 | blk_rq_bio_prep(q, rq, bio); | 239 | blk_rq_bio_prep(q, rq, bio); |
| 241 | rq->buffer = NULL; | ||
| 242 | return 0; | 240 | return 0; |
| 243 | } | 241 | } |
| 244 | EXPORT_SYMBOL(blk_rq_map_user_iov); | 242 | EXPORT_SYMBOL(blk_rq_map_user_iov); |
| @@ -325,7 +323,6 @@ int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf, | |||
| 325 | } | 323 | } |
| 326 | 324 | ||
| 327 | blk_queue_bounce(q, &rq->bio); | 325 | blk_queue_bounce(q, &rq->bio); |
| 328 | rq->buffer = NULL; | ||
| 329 | return 0; | 326 | return 0; |
| 330 | } | 327 | } |
| 331 | EXPORT_SYMBOL(blk_rq_map_kern); | 328 | EXPORT_SYMBOL(blk_rq_map_kern); |
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c index 748dea4f34dc..758da2287d9a 100644 --- a/drivers/block/amiflop.c +++ b/drivers/block/amiflop.c | |||
| @@ -1406,7 +1406,7 @@ next_segment: | |||
| 1406 | 1406 | ||
| 1407 | track = block / (floppy->dtype->sects * floppy->type->sect_mult); | 1407 | track = block / (floppy->dtype->sects * floppy->type->sect_mult); |
| 1408 | sector = block % (floppy->dtype->sects * floppy->type->sect_mult); | 1408 | sector = block % (floppy->dtype->sects * floppy->type->sect_mult); |
| 1409 | data = rq->buffer + 512 * cnt; | 1409 | data = bio_data(rq->bio) + 512 * cnt; |
| 1410 | #ifdef DEBUG | 1410 | #ifdef DEBUG |
| 1411 | printk("access to track %d, sector %d, with buffer at " | 1411 | printk("access to track %d, sector %d, with buffer at " |
| 1412 | "0x%08lx\n", track, sector, data); | 1412 | "0x%08lx\n", track, sector, data); |
diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c index 96b629e1f0c9..7e8a55f8917c 100644 --- a/drivers/block/ataflop.c +++ b/drivers/block/ataflop.c | |||
| @@ -1484,7 +1484,7 @@ repeat: | |||
| 1484 | ReqCnt = 0; | 1484 | ReqCnt = 0; |
| 1485 | ReqCmd = rq_data_dir(fd_request); | 1485 | ReqCmd = rq_data_dir(fd_request); |
| 1486 | ReqBlock = blk_rq_pos(fd_request); | 1486 | ReqBlock = blk_rq_pos(fd_request); |
| 1487 | ReqBuffer = fd_request->buffer; | 1487 | ReqBuffer = bio_data(fd_request->bio); |
| 1488 | setup_req_params( drive ); | 1488 | setup_req_params( drive ); |
| 1489 | do_fd_action( drive ); | 1489 | do_fd_action( drive ); |
| 1490 | 1490 | ||
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 8f5565bf34cd..5f69c910c3ac 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
| @@ -2351,7 +2351,7 @@ static void rw_interrupt(void) | |||
| 2351 | } | 2351 | } |
| 2352 | 2352 | ||
| 2353 | if (CT(COMMAND) != FD_READ || | 2353 | if (CT(COMMAND) != FD_READ || |
| 2354 | raw_cmd->kernel_data == current_req->buffer) { | 2354 | raw_cmd->kernel_data == bio_data(current_req->bio)) { |
| 2355 | /* transfer directly from buffer */ | 2355 | /* transfer directly from buffer */ |
| 2356 | cont->done(1); | 2356 | cont->done(1); |
| 2357 | } else if (CT(COMMAND) == FD_READ) { | 2357 | } else if (CT(COMMAND) == FD_READ) { |
| @@ -2640,7 +2640,7 @@ static int make_raw_rw_request(void) | |||
| 2640 | raw_cmd->flags &= ~FD_RAW_WRITE; | 2640 | raw_cmd->flags &= ~FD_RAW_WRITE; |
| 2641 | raw_cmd->flags |= FD_RAW_READ; | 2641 | raw_cmd->flags |= FD_RAW_READ; |
| 2642 | COMMAND = FM_MODE(_floppy, FD_READ); | 2642 | COMMAND = FM_MODE(_floppy, FD_READ); |
| 2643 | } else if ((unsigned long)current_req->buffer < MAX_DMA_ADDRESS) { | 2643 | } else if ((unsigned long)bio_data(current_req->bio) < MAX_DMA_ADDRESS) { |
| 2644 | unsigned long dma_limit; | 2644 | unsigned long dma_limit; |
| 2645 | int direct, indirect; | 2645 | int direct, indirect; |
| 2646 | 2646 | ||
| @@ -2654,13 +2654,13 @@ static int make_raw_rw_request(void) | |||
| 2654 | */ | 2654 | */ |
| 2655 | max_size = buffer_chain_size(); | 2655 | max_size = buffer_chain_size(); |
| 2656 | dma_limit = (MAX_DMA_ADDRESS - | 2656 | dma_limit = (MAX_DMA_ADDRESS - |
| 2657 | ((unsigned long)current_req->buffer)) >> 9; | 2657 | ((unsigned long)bio_data(current_req->bio))) >> 9; |
| 2658 | |||
