Skip to content

Commit

Permalink
virtio-blk: dataplane cleanup
Browse files Browse the repository at this point in the history
No need duplicate the judgment, there is one in function entry.

Cc: Stefan Hajnoczi <[email protected]>
Cc: Kevin Wolf <[email protected]>
Cc: Max Reitz <[email protected]>
Signed-off-by: Cao jin <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
  • Loading branch information
Cao jin authored and stefanhaRH committed Jul 18, 2016
1 parent f8dccbb commit ab3b9c1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions hw/block/dataplane/virtio-blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,8 @@ void virtio_blk_data_plane_create(VirtIODevice *vdev, VirtIOBlkConf *conf,
s->vdev = vdev;
s->conf = conf;

if (conf->iothread) {
s->iothread = conf->iothread;
object_ref(OBJECT(s->iothread));
}
s->iothread = conf->iothread;
object_ref(OBJECT(s->iothread));
s->ctx = iothread_get_aio_context(s->iothread);
s->bh = aio_bh_new(s->ctx, notify_guest_bh, s);
s->batch_notify_vqs = bitmap_new(conf->num_queues);
Expand Down

0 comments on commit ab3b9c1

Please sign in to comment.