summaryrefslogtreecommitdiff
path: root/drivers/hv/connection.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-07-12 14:12:04 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-07-12 14:12:04 -0700
commit56a50f20eade9a1777375d40e04434788b6ff414 (patch)
treeb346e7e5bb5b805d46658f969d7f748bb70add14 /drivers/hv/connection.c
parent303f8ad1c5f4bed903a62f4afdbd2b252e2a1270 (diff)
parent6d827fbcc370ca259a2905309f64161ab7b10596 (diff)
Merge tag 'char-misc-3.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver fixes from Greg KH: "Here are two hyperv driver fixes, and one i8k driver fix for 3.16" * tag 'char-misc-3.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: i8k: Fix non-SMP operation Drivers: hv: util: Fix a bug in the KVP code Drivers: hv: vmbus: Fix a bug in the channel callback dispatch code
Diffstat (limited to 'drivers/hv/connection.c')
-rw-r--r--drivers/hv/connection.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c
index e84f4526eb36..ae22e3c1fc4c 100644
--- a/drivers/hv/connection.c
+++ b/drivers/hv/connection.c
@@ -339,9 +339,13 @@ static void process_chn_event(u32 relid)
*/
do {
- hv_begin_read(&channel->inbound);
+ if (read_state)
+ hv_begin_read(&channel->inbound);
channel->onchannel_callback(arg);
- bytes_to_read = hv_end_read(&channel->inbound);
+ if (read_state)
+ bytes_to_read = hv_end_read(&channel->inbound);
+ else
+ bytes_to_read = 0;
} while (read_state && (bytes_to_read != 0));
} else {
pr_err("no channel callback for relid - %u\n", relid);