mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 03:50:24 +09:00
sunrpc: fix expiry of auth creds
commitf1bafa7375upstream. 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:95cd623250('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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
df60c534d4
commit
59d2e8fa41
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user