projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
powerpc/mpc5200: trivial printk-fixes in mpc52xx_common
[firefly-linux-kernel-4.4.55.git]
/
net
/
core
/
dst.c
diff --git
a/net/core/dst.c
b/net/core/dst.c
index 7deef483c79f263959c0c1dac148529ecc80d73c..fe03266130b62f4950bac5ef4786755e88617a54 100644
(file)
--- a/
net/core/dst.c
+++ b/
net/core/dst.c
@@
-259,6
+259,16
@@
again:
return NULL;
}
return NULL;
}
+void dst_release(struct dst_entry *dst)
+{
+ if (dst) {
+ WARN_ON(atomic_read(&dst->__refcnt) < 1);
+ smp_mb__before_atomic_dec();
+ atomic_dec(&dst->__refcnt);
+ }
+}
+EXPORT_SYMBOL(dst_release);
+
/* Dirty hack. We did it in 2.2 (in __dst_free),
* we have _very_ good reasons not to repeat
* this mistake in 2.3, but we have no choice
/* Dirty hack. We did it in 2.2 (in __dst_free),
* we have _very_ good reasons not to repeat
* this mistake in 2.3, but we have no choice
@@
-279,7
+289,7
@@
static inline void dst_ifdown(struct dst_entry *dst, struct net_device *dev,
if (!unregister) {
dst->input = dst->output = dst_discard;
} else {
if (!unregister) {
dst->input = dst->output = dst_discard;
} else {
- dst->dev = d
st->dev->nd_net
->loopback_dev;
+ dst->dev = d
ev_net(dst->dev)
->loopback_dev;
dev_hold(dst->dev);
dev_put(dev);
if (dst->neighbour && dst->neighbour->dev == dev) {
dev_hold(dst->dev);
dev_put(dev);
if (dst->neighbour && dst->neighbour->dev == dev) {
@@
-295,9
+305,6
@@
static int dst_dev_event(struct notifier_block *this, unsigned long event, void
struct net_device *dev = ptr;
struct dst_entry *dst, *last = NULL;
struct net_device *dev = ptr;
struct dst_entry *dst, *last = NULL;
- if (dev->nd_net != &init_net)
- return NOTIFY_DONE;
-
switch (event) {
case NETDEV_UNREGISTER:
case NETDEV_DOWN:
switch (event) {
case NETDEV_UNREGISTER:
case NETDEV_DOWN: