From: Dexuan Cui Date: Thu, 19 Oct 2017 18:07:35 +0000 (+0000) Subject: vmbus: fix missing signaling in hv_signal_on_read() X-Git-Tag: archive/raspbian/4.9.80-2+rpi1~7^2~1550 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=13c5e97701091f9b02ded0c68809f8a6b08c747a;p=linux-4.9.git vmbus: fix missing signaling in hv_signal_on_read() [Fixes upstream in a much larger set of patches that are not worth backporting to 4.9 - gregkh] When the space available before start of reading (cached_write_sz) is the same as the host required space (pending_sz), we need to still signal host. Fixes: 433e19cf33d3 ("Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()") Signed-off-by: John Starks Signed-off-by: Dexuan Cui Signed-off-by: Stephen Hemminger Signed-off-by: Greg Kroah-Hartman --- diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index d596a076da11..8cc99de27bc2 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h @@ -1521,11 +1521,11 @@ static inline void hv_signal_on_read(struct vmbus_channel *channel) cur_write_sz = hv_get_bytes_to_write(rbi); - if (cur_write_sz < pending_sz) + if (cur_write_sz <= pending_sz) return; cached_write_sz = hv_get_cached_bytes_to_write(rbi); - if (cached_write_sz < pending_sz) + if (cached_write_sz <= pending_sz) vmbus_setevent(channel); return;