summaryrefslogtreecommitdiffstats
path: root/drivers/vhost/test.c
diff options
context:
space:
mode:
authorAsias He <asias@redhat.com>2013-05-07 14:54:36 +0800
committerMichael S. Tsirkin <mst@redhat.com>2013-07-11 15:38:40 +0300
commit22fa90c7fb479694d6affebc049d21f06b714be6 (patch)
treefd62ad11e27171f38d29470e5935736d835d3a4c /drivers/vhost/test.c
parente7802212ea4bbbd5db99181942a19ab36ca4b914 (diff)
downloadop-kernel-dev-22fa90c7fb479694d6affebc049d21f06b714be6.zip
op-kernel-dev-22fa90c7fb479694d6affebc049d21f06b714be6.tar.gz
vhost: Remove custom vhost rcu usage
Now, vq->private_data is always accessed under vq mutex. No need to play the vhost rcu trick. Signed-off-by: Asias He <asias@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vhost/test.c')
-rw-r--r--drivers/vhost/test.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/vhost/test.c b/drivers/vhost/test.c
index a73ea21..339eae8 100644
--- a/drivers/vhost/test.c
+++ b/drivers/vhost/test.c
@@ -13,7 +13,6 @@
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/workqueue.h>
-#include <linux/rcupdate.h>
#include <linux/file.h>
#include <linux/slab.h>
@@ -200,9 +199,8 @@ static long vhost_test_run(struct vhost_test *n, int test)
priv = test ? n : NULL;
/* start polling new socket */
- oldpriv = rcu_dereference_protected(vq->private_data,
- lockdep_is_held(&vq->mutex));
- rcu_assign_pointer(vq->private_data, priv);
+ oldpriv = vq->private_data;
+ vq->private_data = priv;
r = vhost_init_used(&n->vqs[index]);
OpenPOWER on IntegriCloud