summaryrefslogtreecommitdiff
path: root/block/quorum.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2016-11-07 18:00:29 +0100
committerKevin Wolf <kwolf@redhat.com>2017-01-09 13:30:52 +0100
commit10c855196837059b5d988557183c8f8392033e52 (patch)
tree1023b849cb1a6036f2904d0ace5558c6463ff8ee /block/quorum.c
parent536fca7f7ea4913f71df7f420953e97619be74e1 (diff)
downloadqemu-10c855196837059b5d988557183c8f8392033e52.zip
quorum: Remove s from quorum_aio_get() arguments
There is no point in passing the value of bs->opaque in order to overwrite it with itself. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com>
Diffstat (limited to 'block/quorum.c')
-rw-r--r--block/quorum.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/block/quorum.c b/block/quorum.c
index d122299352..dfa9fd3fe5 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -171,18 +171,17 @@ static bool quorum_64bits_compare(QuorumVoteValue *a, QuorumVoteValue *b)
return a->l == b->l;
}
-static QuorumAIOCB *quorum_aio_get(BDRVQuorumState *s,
- BlockDriverState *bs,
+static QuorumAIOCB *quorum_aio_get(BlockDriverState *bs,
QEMUIOVector *qiov,
uint64_t sector_num,
int nb_sectors,
BlockCompletionFunc *cb,
void *opaque)
{
+ BDRVQuorumState *s = bs->opaque;
QuorumAIOCB *acb = qemu_aio_get(&quorum_aiocb_info, bs, cb, opaque);
int i;
- acb->common.bs->opaque = s;
acb->sector_num = sector_num;
acb->nb_sectors = nb_sectors;
acb->qiov = qiov;
@@ -691,7 +690,7 @@ static BlockAIOCB *quorum_aio_readv(BlockDriverState *bs,
void *opaque)
{
BDRVQuorumState *s = bs->opaque;
- QuorumAIOCB *acb = quorum_aio_get(s, bs, qiov, sector_num,
+ QuorumAIOCB *acb = quorum_aio_get(bs, qiov, sector_num,
nb_sectors, cb, opaque);
acb->is_read = true;
acb->children_read = 0;
@@ -711,7 +710,7 @@ static BlockAIOCB *quorum_aio_writev(BlockDriverState *bs,
void *opaque)
{
BDRVQuorumState *s = bs->opaque;
- QuorumAIOCB *acb = quorum_aio_get(s, bs, qiov, sector_num, nb_sectors,
+ QuorumAIOCB *acb = quorum_aio_get(bs, qiov, sector_num, nb_sectors,
cb, opaque);
int i;