diff options
| author | 2021-12-13 10:17:10 +0100 | |
|---|---|---|
| committer | 2021-12-13 10:17:10 +0100 | |
| commit | af40d16042d674442db8cf5fd654fabcd45fea44 (patch) | |
| tree | 56f80d083a4a7236a0ee7914ef2baa8222d65494 /net/core/dst_cache.c | |
| parent | binder: fix pointer cast warning (diff) | |
| parent | Linux 5.16-rc5 (diff) | |
| download | linux-dev-af40d16042d674442db8cf5fd654fabcd45fea44.tar.xz linux-dev-af40d16042d674442db8cf5fd654fabcd45fea44.zip | |
Merge v5.15-rc5 into char-misc-next
We need the fixes in here as well, and also resolve some merge conflicts
in:
drivers/misc/eeprom/at25.c
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); |
