Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14787
b: refs/heads/master
c: c9933d0
h: refs/heads/master
i:
  14785: 173e1ba
  14783: 2c090f6
v: v3
  • Loading branch information
Mitchell Blank Jr authored and David S. Miller committed Nov 30, 2005
1 parent 30b98db commit 2986b2a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 21 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: 18955cfcb2a5d75a08e0cb297f13ccfb6904de48
refs/heads/master: c9933d0856d6d0ede6b4b30e5e7330614f5203af
30 changes: 10 additions & 20 deletions trunk/net/atm/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,33 +423,23 @@ int vcc_connect(struct socket *sock, int itf, short vpi, int vci)
if (vcc->qos.txtp.traffic_class == ATM_ANYCLASS ||
vcc->qos.rxtp.traffic_class == ATM_ANYCLASS)
return -EINVAL;
if (itf != ATM_ITF_ANY) {
if (likely(itf != ATM_ITF_ANY)) {
dev = atm_dev_lookup(itf);
if (!dev)
return -ENODEV;
error = __vcc_connect(vcc, dev, vpi, vci);
if (error) {
atm_dev_put(dev);
return error;
}
} else {
struct list_head *p, *next;

dev = NULL;
spin_lock(&atm_dev_lock);
list_for_each_safe(p, next, &atm_devs) {
dev = list_entry(p, struct atm_dev, dev_list);
if (!list_empty(&atm_devs)) {
dev = list_entry(atm_devs.next, struct atm_dev, dev_list);
atm_dev_hold(dev);
spin_unlock(&atm_dev_lock);
if (!__vcc_connect(vcc, dev, vpi, vci))
break;
atm_dev_put(dev);
dev = NULL;
spin_lock(&atm_dev_lock);
}
spin_unlock(&atm_dev_lock);
if (!dev)
return -ENODEV;
}
if (!dev)
return -ENODEV;
error = __vcc_connect(vcc, dev, vpi, vci);
if (error) {
atm_dev_put(dev);
return error;
}
if (vpi == ATM_VPI_UNSPEC || vci == ATM_VCI_UNSPEC)
set_bit(ATM_VF_PARTIAL,&vcc->flags);
Expand Down

0 comments on commit 2986b2a

Please sign in to comment.