]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/netfilter/ipvs/ip_vs_wrr.c
ipvs: ip_vs_wrr.c: use lib/gcd.c
[mv-sheeva.git] / net / netfilter / ipvs / ip_vs_wrr.c
index 6182e8ea0be7fe4bb4aa3fed045981025fcfd5d2..3c115fc197843287d9bf0dff379e6fbdc4f37c02 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/net.h>
+#include <linux/gcd.h>
 
 #include <net/ip_vs.h>
 
@@ -38,20 +39,6 @@ struct ip_vs_wrr_mark {
 };
 
 
-/*
- *    Get the gcd of server weights
- */
-static int gcd(int a, int b)
-{
-       int c;
-
-       while ((c = a % b)) {
-               a = b;
-               b = c;
-       }
-       return b;
-}
-
 static int ip_vs_wrr_gcd_weight(struct ip_vs_service *svc)
 {
        struct ip_vs_dest *dest;