summaryrefslogtreecommitdiffstats
path: root/drivers/vhost
diff options
context:
space:
mode:
authorPeng Tao <bergwolf@gmail.com>2016-12-07 17:52:19 +0800
committerDavid S. Miller <davem@davemloft.net>2016-12-08 11:26:46 -0500
commit635abf01918157e61dc9cfdfd70c40bd5957b6a3 (patch)
treeae5eba6a1fb12a23b491f134a1d0384748496fb0 /drivers/vhost
parent1440a3a12ba0a00f9fec7e6a62e49b11e079d381 (diff)
downloadlinux-635abf01918157e61dc9cfdfd70c40bd5957b6a3.tar.bz2
vhost: remove unnecessary smp_mb from vhost_work_queue
test_and_set_bit() already implies a memory barrier. Signed-off-by: Peng Tao <bergwolf@gmail.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/vhost')
-rw-r--r--drivers/vhost/vhost.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index c6f2d89c0e97..266354390c8f 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -261,8 +261,8 @@ void vhost_work_queue(struct vhost_dev *dev, struct vhost_work *work)
if (!test_and_set_bit(VHOST_WORK_QUEUED, &work->flags)) {
/* We can only add the work to the list after we're
* sure it was not in the list.
+ * test_and_set_bit() implies a memory barrier.
*/
- smp_mb();
llist_add(&work->node, &dev->work_list);
wake_up_process(dev->worker);
}