diff options
Diffstat (limited to 'net/ipv4/ipvs/ip_vs_sync.c')
-rw-r--r-- | net/ipv4/ipvs/ip_vs_sync.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv4/ipvs/ip_vs_sync.c b/net/ipv4/ipvs/ip_vs_sync.c index 550563a56607..cf5ed758ea1f 100644 --- a/net/ipv4/ipvs/ip_vs_sync.c +++ b/net/ipv4/ipvs/ip_vs_sync.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/udp.h> | 29 | #include <linux/udp.h> |
30 | #include <linux/err.h> | 30 | #include <linux/err.h> |
31 | #include <linux/kthread.h> | 31 | #include <linux/kthread.h> |
32 | #include <linux/wait.h> | ||
32 | 33 | ||
33 | #include <net/ip.h> | 34 | #include <net/ip.h> |
34 | #include <net/sock.h> | 35 | #include <net/sock.h> |
@@ -772,6 +773,10 @@ static int sync_thread_backup(void *data) | |||
772 | ip_vs_backup_mcast_ifn, ip_vs_backup_syncid); | 773 | ip_vs_backup_mcast_ifn, ip_vs_backup_syncid); |
773 | 774 | ||
774 | while (!kthread_should_stop()) { | 775 | while (!kthread_should_stop()) { |
776 | wait_event_interruptible(*tinfo->sock->sk->sk_sleep, | ||
777 | !skb_queue_empty(&tinfo->sock->sk->sk_receive_queue) | ||
778 | || kthread_should_stop()); | ||
779 | |||
775 | /* do we have data now? */ | 780 | /* do we have data now? */ |
776 | while (!skb_queue_empty(&(tinfo->sock->sk->sk_receive_queue))) { | 781 | while (!skb_queue_empty(&(tinfo->sock->sk->sk_receive_queue))) { |
777 | len = ip_vs_receive(tinfo->sock, tinfo->buf, | 782 | len = ip_vs_receive(tinfo->sock, tinfo->buf, |
@@ -787,8 +792,6 @@ static int sync_thread_backup(void *data) | |||
787 | ip_vs_process_message(tinfo->buf, len); | 792 | ip_vs_process_message(tinfo->buf, len); |
788 | local_bh_enable(); | 793 | local_bh_enable(); |
789 | } | 794 | } |
790 | |||
791 | msleep_interruptible(1000); | ||
792 | } | 795 | } |
793 | 796 | ||
794 | /* release the sending multicast socket */ | 797 | /* release the sending multicast socket */ |