Skip to content

Commit

Permalink
virtio_ring: allow to store zero as the ctx
Browse files Browse the repository at this point in the history
Allow zero to be store as a ctx, with this we could store e.g zero
value which could be meaningful for the case of storing headroom
through ctx.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jason Wang authored and David S. Miller committed Jul 24, 2017
1 parent 7a68ada commit 87646a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/virtio/virtio_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ static inline int virtqueue_add(struct virtqueue *_vq,
vq->desc_state[head].data = data;
if (indirect)
vq->desc_state[head].indir_desc = desc;
if (ctx)
else
vq->desc_state[head].indir_desc = ctx;

/* Put entry in available array (but don't update avail->idx until they
Expand Down

0 comments on commit 87646a3

Please sign in to comment.