diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2015-12-15 04:02:01 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-15 04:27:30 +0100 |
commit | 940b68e2c3e4ebf032885203c3970e9649f814af (patch) | |
tree | 3f6da80644a206f45d67c2ef8bc892a5c5351d1f /drivers/misc/hmc6352.c | |
parent | Drivers: hv: remove code duplication between vmbus_recvpacket()/vmbus_recvpac... (diff) | |
download | linux-940b68e2c3e4ebf032885203c3970e9649f814af.tar.xz linux-940b68e2c3e4ebf032885203c3970e9649f814af.zip |
Drivers: hv: ring_buffer: eliminate hv_ringbuffer_peek()
Currently, there is only one user for hv_ringbuffer_read()/
hv_ringbuffer_peak() functions and the usage of these functions is:
- insecure as we drop ring_lock between them, someone else (in theory
only) can acquire it in between;
- non-optimal as we do a number of things (acquire/release the above
mentioned lock, calculate available space on the ring, ...) twice and
this path is performance-critical.
Remove hv_ringbuffer_peek() moving the logic from __vmbus_recvpacket() to
hv_ringbuffer_read().
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/hmc6352.c')
0 files changed, 0 insertions, 0 deletions