diff options
author | David S. Miller <davem@davemloft.net> | 2016-01-07 06:54:18 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-07 06:54:18 +0300 |
commit | 9e0efaf6b41bf22c2eb81258fc2a6f1538a643e5 (patch) | |
tree | e2daa5fb47f707f44b6b7e9da82a6d8017af3f8c /net/core | |
parent | c7f5d105495a38ed09e70d825f75d9d7d5407264 (diff) | |
parent | 51cb67c0b0fcb91581b15bd2e85f29af4d4b2df6 (diff) | |
download | linux-9e0efaf6b41bf22c2eb81258fc2a6f1538a643e5.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dst.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/dst.c b/net/core/dst.c index e6dc77252fe9..a1656e3b8d72 100644 --- a/net/core/dst.c +++ b/net/core/dst.c @@ -301,12 +301,13 @@ void dst_release(struct dst_entry *dst) { if (dst) { int newrefcnt; + unsigned short nocache = dst->flags & DST_NOCACHE; newrefcnt = atomic_dec_return(&dst->__refcnt); if (unlikely(newrefcnt < 0)) net_warn_ratelimited("%s: dst:%p refcnt:%d\n", __func__, dst, newrefcnt); - if (!newrefcnt && unlikely(dst->flags & DST_NOCACHE)) + if (!newrefcnt && unlikely(nocache)) call_rcu(&dst->rcu_head, dst_destroy_rcu); } } |