Subject: linux-next: manual merge of the vhost tree with the virtio tree

From: Stephen Rothwell <[email-masked]>
Date: Fri, 6 Mar 2015 14:36:20 +1100

Hi Michael,

Today's linux-next merge of the vhost tree got a conflict in
drivers/virtio/virtio_balloon.c between commit 7f8998200dcb
("virtio_balloon: annotate possible sleep waiting for event") from the
virtio tree and commit 2426d3b03d07 ("virtio-balloon: do not call
blocking ops when !TASK_RUNNING") from the vhost tree.

I fixed it up (I think - see below) and can carry the fix as necessary
(no action is required).

-- 
Cheers,
Stephen Rothwell                    [email-masked]

diff --cc drivers/virtio/virtio_balloon.c
index 06001ca71ea3,5a6ad6dbdec4..000000000000
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@@ -341,19 -343,17 +343,25 @@@ static int balloon(void *_vballoon
  
  		try_to_freeze();
  
 +		/*
 +		 * Reading the config on the ccw backend involves an
 +		 * allocation, so we may actually sleep and have an
 +		 * extra iteration.  It's extremely unlikely, and this
 +		 * isn't a fast path in any sense.
 +		 */
 +		sched_annotate_sleep();
 +
- 		wait_event_interruptible(vb->config_change,
- 					 (diff = towards_target(vb)) != 0
- 					 || vb->need_stats_update
- 					 || kthread_should_stop()
- 					 || freezing(current));
+ 		add_wait_queue(&vb->config_change, &wait);
+ 		for (;;) {
+ 			if ((diff = towards_target(vb)) != 0 ||
+ 			    vb->need_stats_update ||
+ 			    kthread_should_stop() ||
+ 			    freezing(current))
+ 				break;
+ 			wait_woken(&wait, TASK_INTERRUPTIBLE, MAX_SCHEDULE_TIMEOUT);
+ 		}
+ 		remove_wait_queue(&vb->config_change, &wait);
+ 
  		if (vb->need_stats_update)
  			stats_handle_request(vb);
  		if (diff > 0)