]> 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)
commit5704440ecb2f86a87e9c7da8a80b9ac079c717a8
tree682e11f8da283fb6ddc3ab5bd8bbae3486726afd
parente2f4670cd40b48d11275f957f6910fde39080043
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