]> err.no Git - linux-2.6/blobdiff - net/mac80211/mesh_pathtbl.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6] / net / mac80211 / mesh_pathtbl.c
index 512bfa112c6a2c41fe737837c346b3d83dc166b4..5f88a2e6ee5072e2b1d313c896957078bffa3e79 100644 (file)
@@ -206,7 +206,7 @@ int mesh_path_add(u8 *dst, struct net_device *dev)
                newtbl = mesh_table_grow(mesh_paths);
                if (!newtbl) {
                        write_unlock(&pathtbl_resize_lock);
-                       return -ENOMEM;
+                       return 0;
                }
                rcu_assign_pointer(mesh_paths, newtbl);
                write_unlock(&pathtbl_resize_lock);
@@ -262,7 +262,6 @@ void mesh_plink_broken(struct sta_info *sta)
        }
        rcu_read_unlock();
 }
-EXPORT_SYMBOL(mesh_plink_broken);
 
 /**
  * mesh_path_flush_by_nexthop - Deletes mesh paths if their next hop matches
@@ -469,9 +468,12 @@ static int mesh_path_node_copy(struct hlist_node *p, struct mesh_table *newtbl)
        struct mpath_node *node, *new_node;
        u32 hash_idx;
 
+       new_node = kmalloc(sizeof(struct mpath_node), GFP_ATOMIC);
+       if (new_node == NULL)
+               return -ENOMEM;
+
        node = hlist_entry(p, struct mpath_node, list);
        mpath = node->mpath;
-       new_node = kmalloc(sizeof(struct mpath_node), GFP_KERNEL);
        new_node->mpath = mpath;
        hash_idx = mesh_table_hash(mpath->dst, mpath->dev, newtbl);
        hlist_add_head(&new_node->list,