projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a68ada
)
virtio_ring: allow to store zero as the ctx
author
Jason Wang
<jasowang@redhat.com>
Wed, 19 Jul 2017 08:54:45 +0000
(16:54 +0800)
committer
David S. Miller
<davem@davemloft.net>
Mon, 24 Jul 2017 20:37:00 +0000
(13:37 -0700)
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>
drivers/virtio/virtio_ring.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/virtio/virtio_ring.c
b/drivers/virtio/virtio_ring.c
index 5e1b548828e60745ba87581d2b9bcb6380b092f8..9aaa177e8209731cbe63aef3c7f1479ab2497851 100644
(file)
--- a/
drivers/virtio/virtio_ring.c
+++ b/
drivers/virtio/virtio_ring.c
@@
-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