diff options
author | NeilBrown <neilb@suse.com> | 2017-06-18 00:38:57 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-06-18 14:40:59 -0400 |
commit | af67c31fba3b879b241536a48df703a2eee18ebf (patch) | |
tree | 60b9f32d39c955a79e552b00900e1a6ceb66532b /drivers/lightnvm/pblk-init.c | |
parent | e4cdf1a1cb161a648cc1ed7d6148fc3b99a1b3f5 (diff) |
blk: remove bio_set arg from blk_queue_split()
blk_queue_split() is always called with the last arg being q->bio_split,
where 'q' is the first arg.
Also blk_queue_split() sometimes uses the passed-in 'bs' and sometimes uses
q->bio_split.
This is inconsistent and unnecessary. Remove the last arg and always use
q->bio_split inside blk_queue_split()
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Credit-to: Javier González <jg@lightnvm.io> (Noticed that lightnvm was missed)
Reviewed-by: Javier González <javier@cnexlabs.com>
Tested-by: Javier González <javier@cnexlabs.com>
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/lightnvm/pblk-init.c')
-rw-r--r-- | drivers/lightnvm/pblk-init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c index ae8cd6d5af8b..b3fec8ec55b8 100644 --- a/drivers/lightnvm/pblk-init.c +++ b/drivers/lightnvm/pblk-init.c | |||
@@ -33,7 +33,7 @@ static int pblk_rw_io(struct request_queue *q, struct pblk *pblk, | |||
33 | * constraint. Writes can be of arbitrary size. | 33 | * constraint. Writes can be of arbitrary size. |
34 | */ | 34 | */ |
35 | if (bio_data_dir(bio) == READ) { | 35 | if (bio_data_dir(bio) == READ) { |
36 | blk_queue_split(q, &bio, q->bio_split); | 36 | blk_queue_split(q, &bio); |
37 | ret = pblk_submit_read(pblk, bio); | 37 | ret = pblk_submit_read(pblk, bio); |
38 | if (ret == NVM_IO_DONE && bio_flagged(bio, BIO_CLONED)) | 38 | if (ret == NVM_IO_DONE && bio_flagged(bio, BIO_CLONED)) |
39 | bio_put(bio); | 39 | bio_put(bio); |
@@ -46,7 +46,7 @@ static int pblk_rw_io(struct request_queue *q, struct pblk *pblk, | |||
46 | * available for user I/O. | 46 | * available for user I/O. |
47 | */ | 47 | */ |
48 | if (unlikely(pblk_get_secs(bio) >= pblk_rl_sysfs_rate_show(&pblk->rl))) | 48 | if (unlikely(pblk_get_secs(bio) >= pblk_rl_sysfs_rate_show(&pblk->rl))) |
49 | blk_queue_split(q, &bio, q->bio_split); | 49 | blk_queue_split(q, &bio); |
50 | 50 | ||
51 | return pblk_write_to_cache(pblk, bio, PBLK_IOTYPE_USER); | 51 | return pblk_write_to_cache(pblk, bio, PBLK_IOTYPE_USER); |
52 | } | 52 | } |