summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDexuan Cui <decui@microsoft.com>2017-10-19 18:07:35 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-27 08:38:08 (GMT)
commit13c5e97701091f9b02ded0c68809f8a6b08c747a (patch)
tree42f2bd4e958586f86cc03271a8e17fd4ee401f96 /include
parent1c33c8f8a727a86f4a8f457a5afa4d6e8198dee5 (diff)
downloadlinux-13c5e97701091f9b02ded0c68809f8a6b08c747a.tar.xz
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 <jon.Starks@microsoft.com> Signed-off-by: Dexuan Cui <decui@microsoft.com> Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/hyperv.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index d596a07..8cc99de 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;