]> git.baikalelectronics.ru Git - kernel.git/commit
vhost: switch to use vhost_add_used_n()
authorJason Wang <jasowang@redhat.com>
Mon, 2 Sep 2013 08:40:58 +0000 (16:40 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Sep 2013 02:46:57 +0000 (22:46 -0400)
commit6bf8223af7edd944a929f1d7ac66650e6d9c4817
tree682e11f8da283fb6ddc3ab5bd8bbae3486726afd
parentb0410f60ac14fe1f6ad1b3e1a45dabc978560054
vhost: switch to use vhost_add_used_n()

Let vhost_add_used() to use vhost_add_used_n() to reduce the code
duplication. To avoid the overhead brought by __copy_to_user(). We will use
put_user() when one used need to be added.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/vhost/vhost.c