]> err.no Git - linux-2.6/blobdiff - net/ipv4/multipath_drr.c
[PATCH] remove many unneeded #includes of sched.h
[linux-2.6] / net / ipv4 / multipath_drr.c
index c9cf8726051d7cae07a3d1278b0bea36b1c2eee5..574c735836fc9373f2d4d66115ea07b4ad7cf484 100644 (file)
  *             2 of the License, or (at your option) any later version.
  */
 
-#include <linux/config.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
 #include <linux/types.h>
-#include <linux/sched.h>
 #include <linux/errno.h>
 #include <linux/timer.h>
 #include <linux/mm.h>
@@ -107,7 +105,7 @@ static int drr_dev_event(struct notifier_block *this,
        return NOTIFY_DONE;
 }
 
-struct notifier_block drr_dev_notifier = {
+static struct notifier_block drr_dev_notifier = {
        .notifier_call  = drr_dev_event,
 };
 
@@ -135,7 +133,7 @@ static void drr_select_route(const struct flowi *flp,
                             struct rtable *first, struct rtable **rp)
 {
        struct rtable *nh, *result, *cur_min;
-       int min_usecount = -1; 
+       int min_usecount = -1;
        int devidx = -1;
        int cur_min_devidx = -1;
 
@@ -144,7 +142,7 @@ static void drr_select_route(const struct flowi *flp,
        result = NULL;
        cur_min = NULL;
        for (nh = rcu_dereference(first); nh;
-            nh = rcu_dereference(nh->u.rt_next)) {
+            nh = rcu_dereference(nh->u.dst.rt_next)) {
                if ((nh->u.dst.flags & DST_BALANCED) != 0 &&
                    multipath_comparekeys(&nh->fl, flp)) {
                        int nh_ifidx = nh->u.dst.dev->ifindex;
@@ -162,7 +160,7 @@ static void drr_select_route(const struct flowi *flp,
                         */
                        devidx = __multipath_finddev(nh_ifidx);
                        if (devidx == -1) {
-                               /* add the interface to the array 
+                               /* add the interface to the array
                                 * SMP safe
                                 */
                                spin_lock_bh(&state_lock);