diff options
author | Asias He <asias@redhat.com> | 2013-05-07 02:54:36 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2013-07-11 08:38:40 -0400 |
commit | 22fa90c7fb479694d6affebc049d21f06b714be6 (patch) | |
tree | fd62ad11e27171f38d29470e5935736d835d3a4c /drivers/vhost/test.c | |
parent | e7802212ea4bbbd5db99181942a19ab36ca4b914 (diff) |
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.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/vhost/test.c b/drivers/vhost/test.c index a73ea217f24d..339eae85859a 100644 --- a/drivers/vhost/test.c +++ b/drivers/vhost/test.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/mutex.h> | 14 | #include <linux/mutex.h> |
15 | #include <linux/workqueue.h> | 15 | #include <linux/workqueue.h> |
16 | #include <linux/rcupdate.h> | ||
17 | #include <linux/file.h> | 16 | #include <linux/file.h> |
18 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
19 | 18 | ||
@@ -200,9 +199,8 @@ static long vhost_test_run(struct vhost_test *n, int test) | |||
200 | priv = test ? n : NULL; | 199 | priv = test ? n : NULL; |
201 | 200 | ||
202 | /* start polling new socket */ | 201 | /* start polling new socket */ |
203 | oldpriv = rcu_dereference_protected(vq->private_data, | 202 | oldpriv = vq->private_data; |
204 | lockdep_is_held(&vq->mutex)); | 203 | vq->private_data = priv; |
205 | rcu_assign_pointer(vq->private_data, priv); | ||
206 | 204 | ||
207 | r = vhost_init_used(&n->vqs[index]); | 205 | r = vhost_init_used(&n->vqs[index]); |
208 | 206 | ||