patch-2.4.22 linux-2.4.22/net/ipv4/fib_semantics.c
Next file: linux-2.4.22/net/ipv4/icmp.c
Previous file: linux-2.4.22/net/ipv4/fib_hash.c
Back to the patch index
Back to the overall index
- Lines: 27
- Date:
2003-08-25 04:44:44.000000000 -0700
- Orig file:
linux-2.4.21/net/ipv4/fib_semantics.c
- Orig date:
2003-06-13 07:51:39.000000000 -0700
diff -urN linux-2.4.21/net/ipv4/fib_semantics.c linux-2.4.22/net/ipv4/fib_semantics.c
@@ -368,7 +368,7 @@
if (!(dev->flags&IFF_UP))
return -ENETDOWN;
nh->nh_dev = dev;
- atomic_inc(&dev->refcnt);
+ dev_hold(dev);
nh->nh_scope = RT_SCOPE_LINK;
return 0;
}
@@ -389,7 +389,7 @@
nh->nh_oif = FIB_RES_OIF(res);
if ((nh->nh_dev = FIB_RES_DEV(res)) == NULL)
goto out;
- atomic_inc(&nh->nh_dev->refcnt);
+ dev_hold(nh->nh_dev);
err = -ENETDOWN;
if (!(nh->nh_dev->flags & IFF_UP))
goto out;
@@ -411,7 +411,7 @@
return -ENETDOWN;
}
nh->nh_dev = in_dev->dev;
- atomic_inc(&nh->nh_dev->refcnt);
+ dev_hold(nh->nh_dev);
nh->nh_scope = RT_SCOPE_HOST;
in_dev_put(in_dev);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)