patch-2.4.0-test9 linux/net/x25/x25_link.c
Next file: linux/net/x25/x25_out.c
Previous file: linux/net/x25/x25_dev.c
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Sun Sep 17 10:03:43 2000
- Orig file:
v2.4.0-test8/linux/net/x25/x25_link.c
- Orig date:
Fri Apr 14 09:38:10 2000
diff -u --recursive --new-file v2.4.0-test8/linux/net/x25/x25_link.c linux/net/x25/x25_link.c
@@ -17,6 +17,7 @@
* X.25 002 Jonathan Naylor New timer architecture.
* mar/20/00 Daniela Squassoni Disabling/enabling of facilities
* negotiation.
+ * 2000-09-04 Henner Eisen dev_hold() / dev_put() for x25_neigh.
*/
#include <linux/config.h>
@@ -292,6 +293,7 @@
init_timer(&x25_neigh->t20timer);
+ dev_hold(dev);
x25_neigh->dev = dev;
x25_neigh->state = X25_LINK_STATE_0;
x25_neigh->extended = 0;
@@ -349,8 +351,10 @@
neigh = x25_neigh;
x25_neigh = x25_neigh->next;
- if (neigh->dev == dev)
+ if (neigh->dev == dev){
x25_remove_neigh(neigh);
+ dev_put(dev);
+ }
}
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)