Drivers: hv: ring_buffer: remove code duplication from hv_ringbuffer_peek/read()
authorVitaly Kuznetsov <vkuznets@redhat.com>
Tue, 15 Dec 2015 03:01:59 +0000 (19:01 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Dec 2015 03:27:30 +0000 (19:27 -0800)
commitb5f53dde8d8e84a6ee200dbd0bd90a400a8fe1a1
treea687c90208f4a31eaa6f4be4a29264742864f889
parent45870a441361d1c05a5f767c4ece2f6e30e0da9c
Drivers: hv: ring_buffer: remove code duplication from hv_ringbuffer_peek/read()

hv_ringbuffer_peek() does the same as hv_ringbuffer_read() without
advancing the read index. The only functional change this patch brings
is moving hv_need_to_signal_on_read() call under the ring_lock but this
function is just a couple of comparisons.

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>
drivers/hv/ring_buffer.c