summaryrefslogtreecommitdiffstats
path: root/include/net/dst.h
diff options
context:
space:
mode:
authorWei Wang <weiwan@google.com>2017-06-17 10:42:39 -0700
committerDavid S. Miller <davem@davemloft.net>2017-06-17 22:54:01 -0400
commit560fd93bca66c235d04cb7fcb2229b96546e27c8 (patch)
tree62997217da7c3b41369cd3d71ecae019026ec1af /include/net/dst.h
parent52df157f17e564ec22afc3e4a89b21828220f576 (diff)
downloadtalos-obmc-linux-560fd93bca66c235d04cb7fcb2229b96546e27c8.tar.gz
talos-obmc-linux-560fd93bca66c235d04cb7fcb2229b96546e27c8.zip
decnet: take dst->__refcnt when struct dn_route is created
struct dn_route is inserted into dn_rt_hash_table but no dst->__refcnt is taken. This patch makes sure the dn_rt_hash_table's reference to the dst is ref counted. As the dst is always ref counted properly, we can safely mark DST_NOGC flag so dst_release() will release dst based on refcnt only. And dst gc is no longer needed and all dst_free() or its related function calls should be replaced with dst_release() or dst_release_immediate(). And dst_dev_put() is called when removing dst from the hash table to release the reference on dst->dev before we lose pointer to it. Also, correct the logic in dn_dst_check_expire() and dn_dst_gc() to check dst->__refcnt to be > 1 to indicate it is referenced by other users. Signed-off-by: Wei Wang <weiwan@google.com> Acked-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/dst.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud