]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/hv/connection.c
Merge tag 'stable/for-linus-3.16-rc5-tag' of git://git.kernel.org/pub/scm/linux/kerne...
[karo-tx-linux.git] / drivers / hv / connection.c
index e84f4526eb36aaad44e8177febfaabde7efc2e81..ae22e3c1fc4c189f675b1ccd2c18cf90d5d4d8fc 100644 (file)
@@ -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);