
From: Trond Myklebust <trondmy@gmail.com> mainline inclusion from mainline-v5.6-rc1 commit 1d82163714c16ebe09c7a8c9cd3cef7abcc16208 category: bugfix bugzilla: 51810 CVE: NA ------------------------------------------------- When we unhash the cache entry, we need to handle any pending upcalls by calling cache_fresh_unlocked(). Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Lu Wei <luwei32@huawei.com> Reviewed-by: Yue Haibing <yuehaibing@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- net/sunrpc/cache.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index afab8fce92054..d2c089e5041fb 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c @@ -1855,7 +1855,9 @@ void sunrpc_cache_unhash(struct cache_detail *cd, struct cache_head *h) if (!hlist_unhashed(&h->cache_list)){ hlist_del_init(&h->cache_list); cd->entries--; + set_bit(CACHE_CLEANED, &h->flags); write_unlock(&cd->hash_lock); + cache_fresh_unlocked(h, cd); cache_put(h, cd); } else write_unlock(&cd->hash_lock); -- 2.25.1