Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96554
b: refs/heads/master
c: f84e71a
h: refs/heads/master
v: v3
  • Loading branch information
Pavel Emelyanov authored and John W. Linville committed May 13, 2008
1 parent f5b91aa commit 878666e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 812714d741750038004da505074c9158e9dee270
refs/heads/master: f84e71a94cb5f88d86ab50c251e09379925b80b9
6 changes: 3 additions & 3 deletions trunk/net/mac80211/mesh_pathtbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,14 @@ int mesh_path_add(u8 *dst, struct net_device *dev)
if (atomic_add_unless(&sdata->u.sta.mpaths, 1, MESH_MAX_MPATHS) == 0)
return -ENOSPC;

read_lock(&pathtbl_resize_lock);

new_mpath = kzalloc(sizeof(struct mesh_path), GFP_KERNEL);
if (!new_mpath) {
atomic_dec(&sdata->u.sta.mpaths);
err = -ENOMEM;
goto endadd2;
}

read_lock(&pathtbl_resize_lock);
memcpy(new_mpath->dst, dst, ETH_ALEN);
new_mpath->dev = dev;
new_mpath->flags = 0;
Expand Down Expand Up @@ -202,7 +202,6 @@ int mesh_path_add(u8 *dst, struct net_device *dev)

endadd:
spin_unlock(&mesh_paths->hashwlock[hash_idx]);
endadd2:
read_unlock(&pathtbl_resize_lock);
if (!err && grow) {
struct mesh_table *oldtbl, *newtbl;
Expand All @@ -219,6 +218,7 @@ int mesh_path_add(u8 *dst, struct net_device *dev)
mesh_table_free(oldtbl, false);
write_unlock(&pathtbl_resize_lock);
}
endadd2:
return err;
}

Expand Down

0 comments on commit 878666e

Please sign in to comment.