Commit 13c5e977 authored by Dexuan Cui's avatar Dexuan Cui Committed by Greg Kroah-Hartman
Browse files

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: 433e19cf ("Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()")

Signed-off-by: default avatarJohn Starks <jon.Starks@microsoft.com>
Signed-off-by: default avatarDexuan Cui <decui@microsoft.com>
Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1c33c8f8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;