Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 85639
b: refs/heads/master
c: 4de211f
h: refs/heads/master
i:
  85637: a647ae7
  85635: 5c9a24e
  85631: 603f8bf
v: v3
  • Loading branch information
Jarek Poplawski authored and David S. Miller committed Feb 13, 2008
1 parent 4778a31 commit aa50f79
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 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: 1105b5d1d44e6f00e31422dfcb0139bc8ae966a9
refs/heads/master: 4de211f1a279275c6c67d6e9b6b25513e46b0bb9
28 changes: 14 additions & 14 deletions trunk/net/ax25/ax25_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void ax25_rt_device_down(struct net_device *dev)
{
ax25_route *s, *t, *ax25_rt;

write_lock(&ax25_route_lock);
write_lock_bh(&ax25_route_lock);
ax25_rt = ax25_route_list;
while (ax25_rt != NULL) {
s = ax25_rt;
Expand All @@ -68,7 +68,7 @@ void ax25_rt_device_down(struct net_device *dev)
}
}
}
write_unlock(&ax25_route_lock);
write_unlock_bh(&ax25_route_lock);
}

static int __must_check ax25_rt_add(struct ax25_routes_struct *route)
Expand All @@ -82,7 +82,7 @@ static int __must_check ax25_rt_add(struct ax25_routes_struct *route)
if (route->digi_count > AX25_MAX_DIGIS)
return -EINVAL;

write_lock(&ax25_route_lock);
write_lock_bh(&ax25_route_lock);

ax25_rt = ax25_route_list;
while (ax25_rt != NULL) {
Expand All @@ -92,7 +92,7 @@ static int __must_check ax25_rt_add(struct ax25_routes_struct *route)
ax25_rt->digipeat = NULL;
if (route->digi_count != 0) {
if ((ax25_rt->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) {
write_unlock(&ax25_route_lock);
write_unlock_bh(&ax25_route_lock);
return -ENOMEM;
}
ax25_rt->digipeat->lastrepeat = -1;
Expand All @@ -102,14 +102,14 @@ static int __must_check ax25_rt_add(struct ax25_routes_struct *route)
ax25_rt->digipeat->calls[i] = route->digi_addr[i];
}
}
write_unlock(&ax25_route_lock);
write_unlock_bh(&ax25_route_lock);
return 0;
}
ax25_rt = ax25_rt->next;
}

if ((ax25_rt = kmalloc(sizeof(ax25_route), GFP_ATOMIC)) == NULL) {
write_unlock(&ax25_route_lock);
write_unlock_bh(&ax25_route_lock);
return -ENOMEM;
}

Expand All @@ -120,7 +120,7 @@ static int __must_check ax25_rt_add(struct ax25_routes_struct *route)
ax25_rt->ip_mode = ' ';
if (route->digi_count != 0) {
if ((ax25_rt->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) {
write_unlock(&ax25_route_lock);
write_unlock_bh(&ax25_route_lock);
kfree(ax25_rt);
return -ENOMEM;
}
Expand All @@ -133,7 +133,7 @@ static int __must_check ax25_rt_add(struct ax25_routes_struct *route)
}
ax25_rt->next = ax25_route_list;
ax25_route_list = ax25_rt;
write_unlock(&ax25_route_lock);
write_unlock_bh(&ax25_route_lock);

return 0;
}
Expand All @@ -152,7 +152,7 @@ static int ax25_rt_del(struct ax25_routes_struct *route)
if ((ax25_dev = ax25_addr_ax25dev(&route->port_addr)) == NULL)
return -EINVAL;

write_lock(&ax25_route_lock);
write_lock_bh(&ax25_route_lock);

ax25_rt = ax25_route_list;
while (ax25_rt != NULL) {
Expand All @@ -174,7 +174,7 @@ static int ax25_rt_del(struct ax25_routes_struct *route)
}
}
}
write_unlock(&ax25_route_lock);
write_unlock_bh(&ax25_route_lock);

return 0;
}
Expand All @@ -188,7 +188,7 @@ static int ax25_rt_opt(struct ax25_route_opt_struct *rt_option)
if ((ax25_dev = ax25_addr_ax25dev(&rt_option->port_addr)) == NULL)
return -EINVAL;

write_lock(&ax25_route_lock);
write_lock_bh(&ax25_route_lock);

ax25_rt = ax25_route_list;
while (ax25_rt != NULL) {
Expand Down Expand Up @@ -216,7 +216,7 @@ static int ax25_rt_opt(struct ax25_route_opt_struct *rt_option)
}

out:
write_unlock(&ax25_route_lock);
write_unlock_bh(&ax25_route_lock);
return err;
}

Expand Down Expand Up @@ -492,13 +492,13 @@ void __exit ax25_rt_free(void)
{
ax25_route *s, *ax25_rt = ax25_route_list;

write_lock(&ax25_route_lock);
write_lock_bh(&ax25_route_lock);
while (ax25_rt != NULL) {
s = ax25_rt;
ax25_rt = ax25_rt->next;

kfree(s->digipeat);
kfree(s);
}
write_unlock(&ax25_route_lock);
write_unlock_bh(&ax25_route_lock);
}

0 comments on commit aa50f79

Please sign in to comment.