diff options
Diffstat (limited to 'net/sunrpc/svcauth_unix.c')
-rw-r--r-- | net/sunrpc/svcauth_unix.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c index 06bdf5a1082c..621ca7b4a155 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); |
@@ -493,8 +493,6 @@ static int unix_gid_parse(struct cache_detail *cd, | |||
493 | if (rv) | 493 | if (rv) |
494 | return -EINVAL; | 494 | return -EINVAL; |
495 | uid = make_kuid(&init_user_ns, id); | 495 | uid = make_kuid(&init_user_ns, id); |
496 | if (!uid_valid(uid)) | ||
497 | return -EINVAL; | ||
498 | ug.uid = uid; | 496 | ug.uid = uid; |
499 | 497 | ||
500 | expiry = get_expiry(&mesg); | 498 | expiry = get_expiry(&mesg); |