Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux...
[firefly-linux-kernel-4.4.55.git] / net / sunrpc / svcauth_unix.c
index 1583c8a4eb7f6d7e9a945b7876604352407d2c48..621ca7b4a1552e393f332fda279be25d7f082152 100644 (file)
@@ -347,13 +347,13 @@ ip_map_cached_get(struct svc_xprt *xprt)
                spin_lock(&xprt->xpt_lock);
                ipm = xprt->xpt_auth_cache;
                if (ipm != NULL) {
-                       if (!cache_valid(&ipm->h)) {
+                       sn = net_generic(xprt->xpt_net, sunrpc_net_id);
+                       if (cache_is_expired(sn->ip_map_cache, &ipm->h)) {
                                /*
                                 * The entry has been invalidated since it was
                                 * remembered, e.g. by a second mount from the
                                 * same IP address.
                                 */
-                               sn = net_generic(xprt->xpt_net, sunrpc_net_id);
                                xprt->xpt_auth_cache = NULL;
                                spin_unlock(&xprt->xpt_lock);
                                cache_put(&ipm->h, sn->ip_map_cache);