diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-12-06 09:31:18 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-12-06 09:31:18 +0100 |
commit | d598c3c46ea69ea974f0613a651cd4ef3be0c870 (patch) | |
tree | 92c4b32aa13596484d81988f530d888586ff7c7a /net/core/dst_cache.c | |
parent | 9899aa5ba525c293ea14f20891f3d98690661aea (diff) | |
parent | 0fcfb00b28c0b7884635dacf38e46d60bf3d4eb1 (diff) |
Merge 5.16-rc4 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/core/dst_cache.c')
-rw-r--r-- | net/core/dst_cache.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/net/core/dst_cache.c b/net/core/dst_cache.c index be74ab4551c2..0ccfd5fa5cb9 100644 --- a/net/core/dst_cache.c +++ b/net/core/dst_cache.c @@ -162,3 +162,22 @@ void dst_cache_destroy(struct dst_cache *dst_cache) free_percpu(dst_cache->cache); } EXPORT_SYMBOL_GPL(dst_cache_destroy); + +void dst_cache_reset_now(struct dst_cache *dst_cache) +{ + int i; + + if (!dst_cache->cache) + return; + + dst_cache->reset_ts = jiffies; + for_each_possible_cpu(i) { + struct dst_cache_pcpu *idst = per_cpu_ptr(dst_cache->cache, i); + struct dst_entry *dst = idst->dst; + + idst->cookie = 0; + idst->dst = NULL; + dst_release(dst); + } +} +EXPORT_SYMBOL_GPL(dst_cache_reset_now); |