diff options
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/cache.c | 6 | ||||
-rw-r--r-- | net/sunrpc/svcauth_unix.c | 4 |
2 files changed, 2 insertions, 8 deletions
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index b12144c5edd0..5478a015ab00 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c | |||
@@ -50,12 +50,6 @@ static void cache_init(struct cache_head *h) | |||
50 | h->last_refresh = now; | 50 | h->last_refresh = now; |
51 | } | 51 | } |
52 | 52 | ||
53 | static inline int cache_is_expired(struct cache_detail *detail, struct cache_head *h) | ||
54 | { | ||
55 | return (h->expiry_time < seconds_since_boot()) || | ||
56 | (detail->flush_time > h->last_refresh); | ||
57 | } | ||
58 | |||
59 | struct cache_head *sunrpc_cache_lookup(struct cache_detail *detail, | 53 | struct cache_head *sunrpc_cache_lookup(struct cache_detail *detail, |
60 | struct cache_head *key, int hash) | 54 | struct cache_head *key, int hash) |
61 | { | 55 | { |
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c index 06bdf5a1082c..a98853dfccdc 100644 --- a/net/sunrpc/svcauth_unix.c +++ b/net/sunrpc/svcauth_unix.c | |||
@@ -347,13 +347,13 @@ ip_map_cached_get(struct svc_xprt *xprt) | |||
347 | spin_lock(&xprt->xpt_lock); | 347 | spin_lock(&xprt->xpt_lock); |
348 | ipm = xprt->xpt_auth_cache; | 348 | ipm = xprt->xpt_auth_cache; |
349 | if (ipm != NULL) { | 349 | if (ipm != NULL) { |
350 | if (!cache_valid(&ipm->h)) { | 350 | sn = net_generic(xprt->xpt_net, sunrpc_net_id); |
351 | if (cache_is_expired(sn->ip_map_cache, &ipm->h)) { | ||
351 | /* | 352 | /* |
352 | * The entry has been invalidated since it was | 353 | * The entry has been invalidated since it was |
353 | * remembered, e.g. by a second mount from the | 354 | * remembered, e.g. by a second mount from the |
354 | * same IP address. | 355 | * same IP address. |
355 | */ | 356 | */ |
356 | sn = net_generic(xprt->xpt_net, sunrpc_net_id); | ||
357 | xprt->xpt_auth_cache = NULL; | 357 | xprt->xpt_auth_cache = NULL; |
358 | spin_unlock(&xprt->xpt_lock); | 358 | spin_unlock(&xprt->xpt_lock); |
359 | cache_put(&ipm->h, sn->ip_map_cache); | 359 | cache_put(&ipm->h, sn->ip_map_cache); |