Message ID | 1453505401-29377-109-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/net/core/dst.c b/net/core/dst.c index c070705..74d1ad1 100644 --- a/net/core/dst.c +++ b/net/core/dst.c @@ -280,10 +280,11 @@ void dst_release(struct dst_entry *dst) { if (dst) { int newrefcnt; + unsigned short nocache = dst->flags & DST_NOCACHE; newrefcnt = atomic_dec_return(&dst->__refcnt); WARN_ON(newrefcnt < 0); - if (!newrefcnt && unlikely(dst->flags & DST_NOCACHE)) + if (!newrefcnt && unlikely(nocache)) call_rcu(&dst->rcu_head, dst_destroy_rcu); } }