X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fptlrpc%2Fgss%2Fgss_svc_upcall.c;fp=lustre%2Fptlrpc%2Fgss%2Fgss_svc_upcall.c;h=4074f22e3f30b67f1a394f97ca0a52c2cbb52690;hb=7a56a689d4aa588bd003e35fdb93d87cf1e56d1d;hp=063a5c2d9ea2b62c1f89254df65bb83289b316fa;hpb=7e4666eb616120fdf78117b2e3681d28ee1ee2c7;p=fs%2Flustre-release.git diff --git a/lustre/ptlrpc/gss/gss_svc_upcall.c b/lustre/ptlrpc/gss/gss_svc_upcall.c index 063a5c2..4074f22 100644 --- a/lustre/ptlrpc/gss/gss_svc_upcall.c +++ b/lustre/ptlrpc/gss/gss_svc_upcall.c @@ -931,8 +931,14 @@ int gss_svc_upcall_handle_init(struct ptlrpc_request *req, rc = SECSVC_OK; out: - if (!IS_ERR_OR_NULL(rsip)) + if (!IS_ERR_OR_NULL(rsip)) { + /* After rpcsec init request has been handled, + * no need to keep rsi entry in cache, no matter the result. + * So mark it invalid now. + */ + UC_CACHE_SET_INVALID(rsip->si_uc_entry); rsi_entry_put(rsicache, rsip); + } if (!IS_ERR_OR_NULL(rscp)) { /* if anything went wrong, we don't keep the context too */ if (rc != SECSVC_OK) @@ -1040,7 +1046,7 @@ int __init gss_init_svc_upcall(void) rsicache = upcall_cache_init(RSI_CACHE_NAME, RSI_UPCALL_PATH, UC_RSICACHE_HASH_SIZE, - 3600, /* entry expire: 1 h */ + 600, /* entry expire: 10 mn */ 30, /* acquire expire: 30 s */ false, /* can't replay acquire */ &rsi_upcall_cache_ops);