]> git.baikalelectronics.ru Git - kernel.git/commit
vhost: cleanup iterator update logic
authorMichael S. Tsirkin <mst@redhat.com>
Wed, 25 Feb 2015 14:19:28 +0000 (15:19 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Feb 2015 20:53:44 +0000 (15:53 -0500)
commit84d2ada6e752f751c0417197e273007cb4ba8188
tree03a323eceb7203dcf739317e5bb2a3e34cf52e7c
parenteea30235df0b9ead6f113149fa18c8b81bdd90cc
vhost: cleanup iterator update logic

Recent iterator-related changes in vhost made it
harder to follow the logic fixing up the header.
In fact, the fixup always happens at the same
offset: sizeof(virtio_net_hdr): sometimes the
fixup iterator is updated by copy_to_iter,
sometimes-by iov_iter_advance.

Rearrange code to make this obvious.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/vhost/net.c