I guess that this code used to be more complex, but replacing
the goto with a while seems to make things a bit more readable.
Or in other words, two fairly gratuitous goto are removed.

On a related note, I wonder if there should be a limit to how
many times it tries.

Signed-Off-By: Simon Horman <[EMAIL PROTECTED]>

Index: linux-2.6/net/ipv4/ipvs/ip_vs_sync.c
===================================================================
--- linux-2.6.orig/net/ipv4/ipvs/ip_vs_sync.c   2006-11-29 09:50:37.000000000 
+0900
+++ linux-2.6/net/ipv4/ipvs/ip_vs_sync.c        2006-11-29 10:03:11.000000000 
+0900
@@ -822,12 +822,10 @@
 
        /* fork the sync thread here, then the parent process of the
           sync thread is the init process after this thread exits. */
-  repeat:
-       if ((pid = kernel_thread(sync_thread, startup, 0)) < 0) {
+       while ((pid = kernel_thread(sync_thread, startup, 0)) < 0) {
                IP_VS_ERR("could not create sync_thread due to %d... "
                          "retrying.\n", pid);
                msleep_interruptible(1000);
-               goto repeat;
        }
 
        return 0;
@@ -856,12 +854,10 @@
                ip_vs_backup_syncid = syncid;
        }
 
-  repeat:
-       if ((pid = kernel_thread(fork_sync_thread, &startup, 0)) < 0) {
+       while ((pid = kernel_thread(fork_sync_thread, &startup, 0)) < 0) {
                IP_VS_ERR("could not create fork_sync_thread due to %d... "
                          "retrying.\n", pid);
                msleep_interruptible(1000);
-               goto repeat;
        }
 
        wait_for_completion(&startup);
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to