Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 87646a34 authored by Jason Wang's avatar Jason Wang Committed by David S. Miller
Browse files

virtio_ring: allow to store zero as the ctx



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: default avatarJason Wang <jasowang@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7a68ada6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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