blob: bf105684ed9353b4d9be2208193004044d00244a [file] [log] [blame]
diff -ur linux-3.10.0-1160.31.1.el7/net/sunrpc/cache.c linux-3.10.0-1160.31.1.el7.actifio/net/sunrpc/cache.c
--- linux-3.10.0-1160.31.1.el7/net/sunrpc/cache.c 2021-05-26 19:49:38.000000000 +0000
+++ linux-3.10.0-1160.31.1.el7.actifio/net/sunrpc/cache.c 2021-07-09 20:29:11.674408818 +0000
@@ -40,6 +40,11 @@
static bool cache_defer_req(struct cache_req *req, struct cache_head *item);
static void cache_revisit_request(struct cache_head *item);
static bool cache_listeners_exist(struct cache_detail *detail);
+static void cache_fresh_locked(struct cache_head *head, time_t expiry,
+ struct cache_detail *detail);
+static void cache_fresh_unlocked(struct cache_head *head,
+ struct cache_detail *detail);
+
static void cache_init(struct cache_head *h, struct cache_detail *detail)
{
@@ -98,6 +103,7 @@
*hp = tmp->next;
tmp->next = NULL;
detail->entries --;
+ cache_fresh_locked(tmp, 0, detail);
freeme = tmp;
break;
}
@@ -114,7 +120,10 @@
write_unlock(&detail->hash_lock);
if (freeme)
+ {
+ cache_fresh_unlocked(freeme, detail);
cache_put(freeme, detail);
+ }
return new;
}
EXPORT_SYMBOL_GPL(sunrpc_cache_lookup);