aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/nvdimm/blk.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-07-01 10:59:43 +0200
committerJens Axboe <axboe@kernel.dk>2020-07-01 07:27:24 -0600
commitc62b37d96b6eb3ec5ae4cbe00db107bf15aebc93 (patch)
treeb027652585de866a33a22a8a15612f367cdf5f68 /drivers/nvdimm/blk.c
parentblock: remove the nr_sectors variable in generic_make_request_checks (diff)
downloadwireguard-linux-c62b37d96b6eb3ec5ae4cbe00db107bf15aebc93.tar.xz
wireguard-linux-c62b37d96b6eb3ec5ae4cbe00db107bf15aebc93.zip
block: move ->make_request_fn to struct block_device_operations
The make_request_fn is a little weird in that it sits directly in struct request_queue instead of an operation vector. Replace it with a block_device_operations method called submit_bio (which describes much better what it does). Also remove the request_queue argument to it, as the queue can be derived pretty trivially from the bio. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvdimm/blk.c')
-rw-r--r--drivers/nvdimm/blk.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/nvdimm/blk.c b/drivers/nvdimm/blk.c
index 39030a324d7f..1f718381a045 100644
--- a/drivers/nvdimm/blk.c
+++ b/drivers/nvdimm/blk.c
@@ -162,7 +162,7 @@ static int nsblk_do_bvec(struct nd_namespace_blk *nsblk,
return err;
}
-static blk_qc_t nd_blk_make_request(struct request_queue *q, struct bio *bio)
+static blk_qc_t nd_blk_submit_bio(struct bio *bio)
{
struct bio_integrity_payload *bip;
struct nd_namespace_blk *nsblk = bio->bi_disk->private_data;
@@ -225,6 +225,7 @@ static int nsblk_rw_bytes(struct nd_namespace_common *ndns,
static const struct block_device_operations nd_blk_fops = {
.owner = THIS_MODULE,
+ .submit_bio = nd_blk_submit_bio,
.revalidate_disk = nvdimm_revalidate_disk,
};
@@ -250,7 +251,7 @@ static int nsblk_attach_disk(struct nd_namespace_blk *nsblk)
internal_nlba = div_u64(nsblk->size, nsblk_internal_lbasize(nsblk));
available_disk_size = internal_nlba * nsblk_sector_size(nsblk);
- q = blk_alloc_queue(nd_blk_make_request, NUMA_NO_NODE);
+ q = blk_alloc_queue(NUMA_NO_NODE);
if (!q)
return -ENOMEM;
if (devm_add_action_or_reset(dev, nd_blk_release_queue, q))