summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Aloni <dan.aloni@vastdata.com>2022-07-04 15:56:57 +0300
committerTrond Myklebust <trond.myklebust@hammerspace.com>2022-07-12 10:53:10 -0400
commitf1bafa7375c01ff71fb7cb97c06caadfcfe815f3 (patch)
treef27deb14c3b25627c5964f103d00becd2eda32e6
parent8b4e87a1d68f5ae440c42c15c238fd964fd381d0 (diff)
sunrpc: fix expiry of auth creds
Before this commit, with a large enough LRU of expired items (100), the loop skipped all the expired items and was entirely ineffectual in trimming the LRU list. Fixes: 95cd623250ad ('SUNRPC: Clean up the AUTH cache code') Signed-off-by: Dan Aloni <dan.aloni@vastdata.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
-rw-r--r--net/sunrpc/auth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c
index 682fcd24bf43..2324d1e58f21 100644
--- a/net/sunrpc/auth.c
+++ b/net/sunrpc/auth.c
@@ -445,7 +445,7 @@ rpcauth_prune_expired(struct list_head *free, int nr_to_scan)
* Enforce a 60 second garbage collection moratorium
* Note that the cred_unused list must be time-ordered.
*/
- if (!time_in_range(cred->cr_expire, expired, jiffies))
+ if (time_in_range(cred->cr_expire, expired, jiffies))
continue;
if (!rpcauth_unhash_cred(cred))
continue;