virtio: fix typos of memory barriers
authorJason Wang <jasowang@redhat.com>
Fri, 20 Jan 2012 08:16:59 +0000 (16:16 +0800)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 27 Jan 2012 21:40:22 +0000 (08:10 +1030)
Note: this fixes a bug introduced recently in
7b21e34fd1c272e3a8c3846168f2f6287a4cd72b.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/virtio/virtio_ring.c

index 79e1b292c0309b8175a84d7e4353ff94b8e13eb0..78428a863b4691067005f924ded6824524467def 100644 (file)
@@ -35,7 +35,7 @@
 #define virtio_rmb(vq) \
        do { if ((vq)->weak_barriers) smp_rmb(); else rmb(); } while(0)
 #define virtio_wmb(vq) \
-       do { if ((vq)->weak_barriers) smp_rmb(); else rmb(); } while(0)
+       do { if ((vq)->weak_barriers) smp_wmb(); else wmb(); } while(0)
 #else
 /* We must force memory ordering even if guest is UP since host could be
  * running on another CPU, but SMP barriers are defined to barrier() in that