Skip to content

Commit f1bafa7

Browse files
da-xTrond Myklebust
authored andcommitted
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: 95cd623 ('SUNRPC: Clean up the AUTH cache code') Signed-off-by: Dan Aloni <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
1 parent 8b4e87a commit f1bafa7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/sunrpc/auth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ rpcauth_prune_expired(struct list_head *free, int nr_to_scan)
445445
* Enforce a 60 second garbage collection moratorium
446446
* Note that the cred_unused list must be time-ordered.
447447
*/
448-
if (!time_in_range(cred->cr_expire, expired, jiffies))
448+
if (time_in_range(cred->cr_expire, expired, jiffies))
449449
continue;
450450
if (!rpcauth_unhash_cred(cred))
451451
continue;

0 commit comments

Comments
 (0)