summaryrefslogtreecommitdiff
path: root/drivers/mtd/mtd_blkdevs.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2014-04-10 19:46:28 +0400
committerJens Axboe <axboe@fb.com>2014-04-16 00:03:02 +0400
commitb4f42e2831ff9b9fa19252265d7c8985d47eefb9 (patch)
tree6b4e9790eac3b9ca4b37eb140d7027f034411c8a /drivers/mtd/mtd_blkdevs.c
parentf89e0dd9d1a72fdf6b8958bcadfa6abf84f3cae0 (diff)
downloadlinux-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/mtd/mtd_blkdevs.c')
-rw-r--r--drivers/mtd/mtd_blkdevs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index 0b2ccb68c0d0..4dbfaee9aa95 100644
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/drivers/mtd/mtd_blkdevs.c
@@ -82,8 +82,7 @@ static int do_blktrans_request(struct mtd_blktrans_ops *tr,
block = blk_rq_pos(req) << 9 >> tr->blkshift;
nsect = blk_rq_cur_bytes(req) >> tr->blkshift;
-
- buf = req->buffer;
+ buf = bio_data(req->bio);
if (req->cmd_type != REQ_TYPE_FS)
return -EIO;