diff options
author | Jens Axboe <axboe@fb.com> | 2014-04-10 19:46:28 +0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-04-16 00:03:02 +0400 |
commit | b4f42e2831ff9b9fa19252265d7c8985d47eefb9 (patch) | |
tree | 6b4e9790eac3b9ca4b37eb140d7027f034411c8a /drivers/block/skd_main.c | |
parent | f89e0dd9d1a72fdf6b8958bcadfa6abf84f3cae0 (diff) | |
download | linux-b4f42e2831ff9b9fa19252265d7c8985d47eefb9.tar.xz |
block: remove struct request buffer member
This was used in the olden days, back when onions were proper
yellow. Basically it mapped to the current buffer to be
transferred. With highmem being added more than a decade ago,
most drivers map pages out of a bio, and rq->buffer isn't
pointing at anything valid.
Convert old style drivers to just use bio_data().
For the discard payload use case, just reference the page
in the bio.
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block/skd_main.c')
-rw-r--r-- | drivers/block/skd_main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c index a69dd93d1bd5..36bcedfd930c 100644 --- a/drivers/block/skd_main.c +++ b/drivers/block/skd_main.c @@ -563,7 +563,6 @@ skd_prep_discard_cdb(struct skd_scsi_request *scsi_req, req = skreq->req; blk_add_request_payload(req, page, len); - req->buffer = buf; } static void skd_request_fn_not_online(struct request_queue *q); @@ -856,10 +855,10 @@ static void skd_end_request(struct skd_device *skdev, if ((io_flags & REQ_DISCARD) && (skreq->discard_page == 1)) { + struct bio *bio = req->bio; pr_debug("%s:%s:%d, free the page!", skdev->name, __func__, __LINE__); - free_page((unsigned long)req->buffer); - req->buffer = NULL; + __free_page(bio->bi_io_vec->bv_page); } if (unlikely(error)) { |